Gelöst


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

fast 10 Jahre vor

Gelöst


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

fast 10 Jahre vor

Problem


Solve system of equation!
Solve provided system of equation, and find x and y. 2*x+1*y=3 1*x+1*y=2 (hint: use inverse matrix)

fast 10 Jahre vor | 0 | 67 Lösungsvorschläge

Problem


Find x in provided equation!
x^2-2*x+1=0 What is x? (hint: use "roots")

fast 10 Jahre vor | 1 | 122 Lösungsvorschläge

Gelöst


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]

fast 10 Jahre vor

Gelöst


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

fast 10 Jahre vor

Gelöst


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

fast 10 Jahre vor

Gelöst


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

fast 10 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 10 Jahre vor

Gelöst


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

fast 10 Jahre vor

Gelöst


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

fast 10 Jahre vor

Gelöst


Reverse the input
Given an input (n), produce an output in the reverse order with out using string variables or string function. Example x ...

fast 10 Jahre vor

Gelöst


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

fast 10 Jahre vor

Gelöst


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

fast 10 Jahre vor

Gelöst


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

fast 10 Jahre vor

Gelöst


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

fast 10 Jahre vor

Gelöst


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

fast 10 Jahre vor

Gelöst


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

fast 10 Jahre vor

Gelöst


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

fast 10 Jahre vor

Gelöst


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

fast 10 Jahre vor

Gelöst


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

fast 10 Jahre vor

Gelöst


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

fast 10 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

fast 10 Jahre vor

Gelöst


Inverse of Hilbert matrix
Given a non-negative integer x, return the element-wise power of 2 of the inverse of Hilbert matrix.

fast 10 Jahre vor

Gelöst


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

fast 10 Jahre vor

Gelöst


Array of Ones
Create a 100 X 100 array of ones.

fast 10 Jahre vor

Gelöst


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

fast 10 Jahre vor

Gelöst


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

fast 10 Jahre vor

Gelöst


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

fast 10 Jahre vor

Gelöst


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

fast 10 Jahre vor

Mehr laden