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...

2 months 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: ...

2 months 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.

2 months 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....

2 months 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...

2 months ago

Solved


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

2 months 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.

2 months ago

Solved


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

2 months 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,...

2 months ago

Solved


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

2 months 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 ] ...

2 months ago

Solved


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

2 months 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...

2 months 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...

2 months 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.

2 months 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...

2 months 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...

2 months 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...

2 months ago

Solved


Solve an ODE: concentrations predicted by the cells-in-series model
One approach for predicting mixing and transport of contaminants in a river is the cells-in-series model. The model divides a ri...

2 months ago

Solved


varargin
Write a function that can take a diffrent Amount of inputs for every run Which gives you the sum of all Inputs. Example: f(a,b...

2 months ago

Solved


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). The comparison crite...

2 months ago

Solved


Hyperperfect Numbers
A k-hyperperfect number is a natural number n for which the equality n = 1 + k(σ(n) − n − 1) holds, where σ(n) is the divisor ...

2 months ago

Solved


Weird Diagonal Matrix!!
**If you have loved the problem, please like it below(Request)** Given an integer n, create a matrix whose diagonal elements wi...

2 months ago

Solved


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

2 months ago

Solved


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

2 months ago

Solved


Spell musical triads
Chords form the basis of harmony in music. The most basic chords are triads, or groups of three notes. They are specified by thr...

2 months ago

Solved


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

2 months ago

Solved


Define an arithmetic sequence
Given three numbers n, a, and d, define an arithmetic sequence of n terms with a being the initial term of the sequence and d be...

2 months ago

Solved


Solve an ODE: precocious pair’s porcine pursuit
In our previous encounters with Matilda and Labrun, the scintillating siblings collected candy wrappers, amused others with card...

2 months ago

Solved


Find the slope of a line that passes through two vectors
Given two vectors p1 and p2, return the slope of a line that passes through p1 and p2. Examples: Input [p1,p2] = deal([0,1],[...

2 months ago

Load more