Solved


length of string on cylinder
A cylinder H cm high has a circumference of C cm. A string makes exactly N complete turns round the cylinder while its two ends ...

7 years ago

Solved


Matrix diagonalization
You will be given Two matrices A and B. Return 1 if B is the diagonal matrix of A, 0 otherwise

7 years ago

Solved


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

7 years ago

Solved


execute the declaration in strings and return value
execute the commands in strings and return value input='a=23' output=23

7 years ago

Solved


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

7 years ago

Solved


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

7 years ago

Solved


Perfect square.
Determine if the input is a perfect square or not. Example - If input is 25, return 1. If input is 17, return 0.

7 years ago

Solved


subtraction of two nos
given a and b, subtract and give the answer

7 years ago

Solved


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

7 years ago

Solved


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

7 years ago

Solved


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

7 years ago

Solved


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

7 years ago

Solved


Calculate Engine Power
Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm

7 years ago

Solved


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

7 years ago

Solved


String revert
Revert all words in a sting x for example, if x = 'this is a sentence' then y should be 'sentence a is this'

7 years ago

Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

7 years ago

Solved


How many complete pizzas (number 2)
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

7 years ago

Solved


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

7 years ago

Solved


How many complete pizzas
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

7 years ago

Solved


i forgot to use capital I
When referring to yourself you should write "I" (capital) and not "i". So correct the input string x, but be aware that other u...

7 years ago

Solved


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

7 years ago

Solved


Reduce the logic
We have three logical input, x,y and z. The output is: y = ((x&y)|z)&((z|x&y)|(z&y|x))|((x&z)|z)&((y|x&z)|(z&x|y))|(x|y|z) ...

7 years ago

Solved


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

7 years ago

Solved


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

7 years ago

Solved


Magnitude of a vector
Given a vector x, what is its magnitude?

7 years ago

Solved


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

7 years ago

Solved


sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

7 years ago

Solved


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

7 years ago

Solved


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

7 years ago

Solved


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

7 years ago

Load more