Resuelto


Find the median of elements in vector without using in built median function
Given a vector, find the median of the vector whose length is odd without using in built median function. Input : [1,1,2,4,5,5,...

alrededor de 4 años hace

Resuelto


Determine if integer is even
Write a function to determine if an input integer(n) is even. The output should be a boolean (true or false).

alrededor de 4 años hace

Resuelto


Two sum
Give a vector of numbers and a target, return indices of two numbers such that they add up to the target

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Distance of Car
If a car is going x miles per hour, how long does it take to get y miles?

alrededor de 4 años hace

Resuelto


Find the number of zeros in a matrix
Find the number of zeros in a matrix

alrededor de 4 años hace

Resuelto


Calculate the weight of a cow
Initially, the cow weighs 200kg. If it gains x kg every day, how much does it weight after y days?

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Find the number of ones in a matrix.
Find the number of ones in a matrix.

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Determine if input is prime
Output if prime

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Extract the main diagonal of a matrix
Extract the main diagonal of a matrix and return as an array. For example, the main diagonal of the following matrix would be: ...

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Test for CODEchella
Test for CODEchella Find the fourth-root of a number

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Nth term of AP
Given the first term 'a' and the common difference 'd' of an AP series, calculate the nth term of the series.

alrededor de 4 años hace

Resuelto


Return the Fun Numbers
Return the Fun Numbers, just the 3s and 7s

alrededor de 4 años hace

Resuelto


True engineer
Prove that pi is indeed equal to e. Return 1 by rounding pi and e to the nearest integer then asserting rounded pi and e are eq...

alrededor de 4 años hace

Resuelto


Pseudo-vampire number
refer to <https://en.wikipedia.org/wiki/Vampire_number> Given a number x, determine whether it is a pseudo-vampire number. ...

alrededor de 4 años hace

Resuelto


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.

alrededor de 4 años hace

Resuelto


Hanging cable - 02
previous problem - <https://www.mathworks.com/matlabcentral/cody/problems/45373-hanging-cable-01> The height of the poles...

alrededor de 4 años hace

Resuelto


Hanging cable - 01
The height of the poles is h the length of the cable is l u need to find the minimum distance between the poles whic...

alrededor de 4 años hace

Resuelto


Spiral Out - 02
An array is given. Convert it into a spiral matrix. For example, a=1:27; out=[21 22 23 24 25 26 20 ...

alrededor de 4 años hace

Resuelto


Spiral Out - 01
Create a spiral matrix ( clock-wise direction ) of size n. Try to do that without using the built-in function.

alrededor de 4 años hace

Resuelto


Identify Reachable Points
Given a vector of 2-D Points and a vector of 2-D Deltas create an array of all Locations that can be reached from the points usi...

alrededor de 4 años hace

Resuelto


Palindrome string
If a string is palindrome, then return true, otherwise return false.

alrededor de 4 años hace

Problema


Trap a knight
Consider a knight on an infinite chessboard labeled with numbers spiraling outward. A knight starting on the square labeled 1 ca...

alrededor de 4 años hace | 1 | 8 solvers

Problema


Flip the parity of digits in a decimal expansion
The number 349 has the decimal expansion . If we change the even digits from positive to negative, then the number becomes 269 (...

alrededor de 4 años hace | 1 | 9 solvers

Cargar más