Gelöst


Potential Energy
Calculate the potential energy of a rock.

fast 9 Jahre vor

Gelöst


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

fast 9 Jahre vor

Gelöst


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

fast 9 Jahre vor

Gelöst


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

fast 9 Jahre vor

Gelöst


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

fast 9 Jahre vor

Gelöst


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

fast 9 Jahre vor

Gelöst


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

fast 9 Jahre vor

Gelöst


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

fast 9 Jahre vor

Gelöst


Remove the Zero
Given an array n, remove all zeros

fast 9 Jahre vor

Gelöst


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

fast 9 Jahre vor

Gelöst


Freebies anyone? No!!!!
Feel free to copy paste all the tests and voila you solved the problem

fast 9 Jahre vor

Gelöst


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

fast 9 Jahre vor

Gelöst


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

fast 9 Jahre vor

Gelöst


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

fast 9 Jahre vor

Gelöst


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

fast 9 Jahre vor

Gelöst


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

fast 9 Jahre vor

Gelöst


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

fast 9 Jahre vor

Gelöst


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

fast 9 Jahre vor

Gelöst


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

fast 9 Jahre vor

Gelöst


only input
Return the output without writing any code into the function.

fast 9 Jahre vor

Gelöst


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

fast 9 Jahre vor

Gelöst


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

fast 9 Jahre vor

Gelöst


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

fast 9 Jahre vor

Gelöst


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

fast 9 Jahre vor

Gelöst


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

fast 9 Jahre vor

Gelöst


Concatenate two strings
Its very easy. Just concatenate two strings.

fast 9 Jahre vor

Gelöst


Reverse a matrix
Its simple. You have to reverse a given matrix.

fast 9 Jahre vor

Gelöst


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

fast 9 Jahre vor

Gelöst


Max of a Vector
Write a function to return the max of a vector

fast 9 Jahre vor

Gelöst


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

fast 9 Jahre vor

Mehr laden