Solved


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

3 years ago

Solved


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

3 years ago

Solved


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA' Update - Test case...

3 years ago

Solved


Who is the baby and who is the daddy in this family?
Given an array of numbers that shows the characteristcs of all family members, find who is the baby and who is daddy in this fam...

3 years ago

Solved


Find offset of an element of a multi dimensional matrix
For a given multi dimensional matrix and given element, find its offset from the 1st element. Return 0, if element is not fo...

3 years ago

Solved


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

3 years ago

Solved


Matrix rotation as per given angle
Given a user defined matrix and angle of rotation, rotate the elements of output matrix as clockwise or anti-clockwise. Angle wi...

3 years ago

Solved


Find offset of given matrix element from first matrix element
Given matrix m and an element of that matrix, return the offset from its first element. e.g. m=[11 2 34; 40 51 6; 87 8 109] el...

3 years ago

Solved


Taxi vs Euclides

3 years ago

Solved


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

3 years ago

Solved


Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

3 years ago

Solved


Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

3 years ago

Solved


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

3 years ago

Solved


Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

3 years ago

Solved


New Matrix with vector addition on diagonal
consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

3 years ago

Solved


Please check if calorie intake is less than 300 kcal.
I like eating some puddings and some chocolate cookies around 3 o'clock. However, I care about calorie intake. Please check whe...

3 years ago

Solved


I hope to lose weight healthily...
In order to reduce weight healthily, weight will be reduced by 4% every month. Please calculate how many months it will take...

3 years ago

Solved


A kind of decryption
Please convert the vector to letters by referring to the examples below. (eg.1) input vec=[34 1 59] >>> output s='A Z' (eg...

3 years ago

Solved


Let's make puddings !
We will make puddings with eggs, milk and sugar. To make one pudding, we need one egg, 140(cc) of milk, 15 (g) of sugar. Now W...

3 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?

3 years ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

3 years ago

Solved


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

3 years ago

Solved


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

3 years ago

Solved


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

3 years ago

Solved


Create a code for XNOR
Given two inputs, output XNOR of those two

3 years ago

Solved


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

3 years ago

Solved


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

3 years ago

Solved


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

3 years ago

Load more