Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Determine if all elements are odd
Given an array, return true if all of the elements are odd. ex. x = [3 4 1] allOdd(x) ans = false ex. x = [3 5 7; 5 9...

oltre 3 anni fa

Risolto


Find the number of terms in Arithmetic progression
Given a, Tn and d find the number of terms in the AP

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Determine if the inputs are divisible by both 3 and 5.
Given a integer x: return true if it is divisible by both 3 and 5, return false if it is not divisible by either 3 or 5.

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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.

oltre 3 anni fa

Risolto


Determine if input is prime
Output if prime

oltre 3 anni fa

Risolto


determine if input is Odd
Find whether the input is odd. return 1 if true or else 0

oltre 3 anni fa

Risolto


determine if input is even
find the number is even or not

oltre 3 anni fa

Risolto


return odd numbers
Return odd numbers in an vector

oltre 3 anni fa

Risolto


find the position of the given number in vector
return the position of the number in vector

oltre 3 anni fa

Risolto


Determine if a number is prime
A prime number is a whole number greater than 1 whose only factors are 1 and itself.

oltre 3 anni fa

Risolto


Find the nth term in an Arithmetic Progression
Given the starting number, difference and number of elements - find the nth term in the AP

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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.

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Time and Variable mapping and matching
There is a 6X5 cell array where * 1st column represents time values * 2nd and 3rd column represent variables and their value...

oltre 3 anni fa

Risolto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

oltre 3 anni fa

Carica altro