Solved


Pascal's Triangle
Create a matrix of size N x N containing a Pascal's Triangle that starts from the upper left corner according to the test cases ...

11 days ago

Solved


Fibonacci Word
F1='0' F2='1' F3 is the catenation of the previous two. So, F3 = cat(F2,F1)='10'. similarly, F4 = cat(F3,F2)= '101' ...

11 days ago

Solved


Unique rows
A matrix is given as the input. Remove any duplicate rows from the matrix. keep the first occurrence.

11 days ago

Solved


Steering 101-Ackermann Steering Ratio
In a turning vehicle, inner and outer wheels follow different radii. Ackermann steering geometry ensures both wheels roll withou...

11 days ago

Solved


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

11 days ago

Solved


Integer Persistence, Product
Let's construct a sequence as follows: is a given natural number, and is the product of the digits of . The persistence of i...

11 days ago

Solved


Calculating the Union Area of Overlapping Rectangles
Calculate the area covered by a union of multiple rectangles. Each rectangle is represented by 4 integers: the first two integer...

11 days ago

Solved


Perfect shuffle
We call "perfect shuffle" the process of cutting a deck of cards into two equal halves, and then perfectly interleaving them: on...

12 days ago

Solved


Available ingredients + recipe -> number of cakes
Write a function Egg_Milk_Sugar(L, recipe) to determine the maximum number of cakes that can be prepared given a list of availab...

12 days ago

Solved


Sun angle
Determine the angle of the sun above the horizon based on the time of day. Assumptions: the sun rises in the East at 6h00, cor...

12 days ago

Solved


Maximizing Stock Profit
As a stock exchange broker focusing on a single transaction, your goal is to maximize profit by buying a stock at a low price an...

12 days ago

Solved


Hofstadter H sequence
The Hofstadter H sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 4, 4, 5, 5, 6. Write ...

12 days ago

Solved


Hofstadter G sequence
The Hofstadter G sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 3, 4, 4, 5, 6. Write ...

12 days ago

Solved


Reversing Maximal Ascending Subsequences
Create and return a new array that contains the same elements as the input array, but with the elements within each strictly inc...

12 days ago

Solved


Limiting Element Occurrences
You are given a list 'v' of numbers. This list may contain repeated numbers. Your objective is to create a new list that maintai...

12 days ago

Solved


Stern-Brocot Sequence
The Stern-Brocot diatomic sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 1, 3, 2, 3, 1, 4...

12 days ago

Solved


Counting the occurrences of a digit in a book
The printer has printed a book with 'p' pages. How many times did they use the character 'd'? In other words, how many times doe...

12 days ago

Solved


Absolute Sorting
Given an array with various numbers, your have to sort it by absolute value in ascending order. For example, for the array [-2...

12 days ago

Solved


Compress list
Given a non-empty list L of positif integers, compress the list so that only one occurrence is retained if two (or more) equal e...

12 days ago

Solved


Pronounce digits
Given a number num, select the first d decimal places and pronounce the digits (in English). The function returns the pronunciat...

12 days ago

Solved


Spreadsheet Column Number
Spreadsheet uses an alphabetic naming system for columns, starting with 'A', 'B', 'C', etc. The column names continue like 'AB',...

12 days ago

Solved


Pivot index
Let L be a vector of numbers. We are searching for the index n of the pivot element defined as follows: the dot product of the e...

12 days ago

Solved


Interval Compression
Given a set of integers, the task is to create a list of closed intervals where each interval includes its endpoints. For exampl...

12 days ago

Solved


Final Stone Weight
You are given an array with weights of stones. The objective is to determine the weight of the final stone remaining after all c...

12 days ago

Solved


Leader
An element of a list is called a "leader" if every element to its right (and not just the one immediately to its right) is stric...

12 days ago

Solved


Family Savings Analysis
Given the bank accounts of individuals defined by a list of tuples containing the last name, first name, and savings: accounts ...

12 days ago

Solved


Find the triplet
Given an array x of size n > 3 and an integer N, return the indices of three elements in the array that sum up to the given inte...

12 days ago

Solved


Largest Rectangle Area in a Histogram
Given a histogram represented by an array of integers, e.g., [2, 1, 4, 5, 1, 3, 3] : find the maximum area of a rectangle tha...

12 days ago

Solved


Extract Increasing Integers from Digit String
Given a string containing only digits, the function get_integers should return the list of increasing integers obtained by readi...

12 days ago

Solved


Sort by absolute value
Given a list of numbers, arrange them in ascending order based on their absolute values. For example, for the list [-30, -5, 1...

12 days ago

Load more