Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Taxi vs Euclides

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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]

mehr als 3 Jahre vor

Gelöst


Find the density of non-zero values

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


convert binary string to vector!!!

mehr als 3 Jahre vor

Mehr laden