Solved


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

1 month ago

Solved


Find distance travelled by an object starting from rest in time 't' and linear acceleration 'a' = 3t
Find distance travelled by an object starting from rest in time 't' with linear acceleration a = 3t. You are given time t as an ...

1 month ago

Solved


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

1 month ago

Solved


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

1 month ago

Solved


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

1 month ago

Solved


Minimum number of children to distribute unequal cookie portions
A cruel parent wants to distribute N cookies such that it is impossible for every child to receive the same number of cookies. W...

1 month ago

Solved


Mix it up!
Given an input string S, return a new string B, that is created by taking one character from the front and then the end iterativ...

1 month ago

Solved


Caesar Cipher Shift
Given a word and its encrypted version using the caesar cipher, find the shift used.

1 month ago

Solved


B-Zuckerman Numbers
Similar to my last problem (B_Harshad Numbers), B-Zuckerman Numbers are numbers that are divisable by the product of their digit...

1 month ago

Solved


B-Harshad Numbers
Determine (and provide as output in decimal form) all the harshad numbers base B (B-Harshad) from a given array of decimal numbe...

1 month ago

Solved


Monty Python and the Holy Grail: Crossing the Bridge of Death
To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

1 month ago

Solved


Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

1 month ago

Solved


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

1 month ago

Solved


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

1 month ago

Solved


Exponent of IEEE Single
Output the exponent bits as a uint8 of the IEEE representation of the single-typed 32-bit float input.

1 month ago

Solved


Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....

1 month ago

Solved


Can you Jump?
You have been provided with input array of integers. You start with initial position at the first index of this input array, and...

1 month ago

Solved


Vector slither sort!
Sort a numeric vector in the following format: [largest value, smallest value, second largest value, second smallest value, etc...

1 month ago

Solved


Find the number of primes less than input
Given an integer n, determine the number of primes less than or equal to n.

1 month ago

Solved


determine skid distance of car
Determine the distance a car skids to a stop given initial velocity (v) and time (t).

1 month ago

Solved


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

1 month ago

Solved


Sum of Arithmetic Progression
Given the starting number, difference and the number of terms - find the sum of the arithmetic progression.

1 month ago

Solved


Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

1 month ago

Solved


Caesar Cipher
Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.

1 month ago

Solved


Find two numbers that add up to the target value
Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the f...

1 month ago

Solved


Length of shortest path in a directed graph.
Given a directed graph and a start and end node in the graph, return the minimum number of hops required to reach the end node f...

1 month ago

Solved


Absolute Value of the Product of Complex Numbers
Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

1 month ago

Solved


Consecutive Pairs of Smooth Numbers from Set of Prime Numbers
Given an input set of prime numbers (p), generate all pairs of consecutive smooth numbers (x) (see Stormer's Theorem). For exam...

1 month ago

Solved


Find the length of stream affected by a spill
When a contaminant is spilled into a stream, one might want to know how much of the stream is affected—e.g., the length over whi...

1 month ago

Solved


Count the ways to make Scorigami
Regarding the sport known as American football, some people are such rabid fans that they can tell you the statistics of every p...

1 month ago

Load more