A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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.

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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],[...

3 mois il y a

Charger plus