문제를 풀었습니다


Double Factorial
Return double factorial n(n-2)...(5)(3)(1), n>0, odd n!! = n(n-2)...(6)(4)(2), n>0, even 1 ...

4년 초과 전

문제를 풀었습니다


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

4년 초과 전

문제를 풀었습니다


calculate the length of matrix
input 1 array, calculate the length

4년 초과 전

문제를 풀었습니다


Duplicate all elements in the array
Duplicate all elements in the array

4년 초과 전

문제를 풀었습니다


Square
square root of x

4년 초과 전

문제를 풀었습니다


factorial
calculate x!

4년 초과 전

문제를 풀었습니다


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

4년 초과 전

문제를 풀었습니다


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

4년 초과 전

문제를 풀었습니다


Matrix Generation.
if input n =1, generate a matrix y = [1]

4년 초과 전

문제를 풀었습니다


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

4년 초과 전

문제를 풀었습니다


Cantor counting
Find the nth cantor's rational number. the sequence is given below in the link. Sequence: 1/1,1/2,2/1,3/1,2/2,1/3,1/4... ... .....

4년 초과 전

문제를 풀었습니다


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

4년 초과 전

문제를 풀었습니다


check whether a number is a pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

4년 초과 전

문제를 풀었습니다


Repeat elements of a vector
Repeat each elements of a given vector according to their values. say x=[1,2,1,3] y=[1,2,2,1,3,3,3]

4년 초과 전

문제를 풀었습니다


generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

4년 초과 전

문제를 풀었습니다


find subscripts from linear index
a matrix and the linear index of an element is given as input. find the subscripts of that element. if linear index=3 , outp...

4년 초과 전

문제를 풀었습니다


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

4년 초과 전

문제를 풀었습니다


Check if integer is a prime number
Check if integer i is a prime number. Returns logical true '1' if it is.

4년 초과 전

문제를 풀었습니다


Convert Fahrenheit to Kelvin
Convert the value f in Fahrenheit to Kelvin

4년 초과 전

문제를 풀었습니다


Calculate the area of a circle
Given a circle of diameter x calculate its area

4년 초과 전

문제를 풀었습니다


Check if a number belongs in the fibonacci squence
Test if integer i is a number in the fibonacci sequence. Return true if it is.

4년 초과 전

문제를 풀었습니다


Gray code
Given a decimal number, convert it to its corresponding Gray code (see https://en.wikipedia.org/wiki/Gray_code). 8 -- 1100...

4년 초과 전

문제를 풀었습니다


Return the amount of palindromes (words) in the string.
For example: Input: s = 'eye story pop dictionary noon enjoy software moon' Output: amount = 3 Test each word...

4년 초과 전

문제를 풀었습니다


Return the length of the longest word in the string.
Example: Input s='A fractal is a natural phenomenon or a mathematical set that exhibits a repeating pattern that display...

4년 초과 전

문제를 풀었습니다


Return ! if array element starts with a certain letter. Otherwise return ?
Input x=['try' 'once' 'more']; s='t' Output ans='!' Input x=['try' 'once' 'more']; s='O' Output ...

4년 초과 전

문제를 풀었습니다


Local Minima
Given a vector of data x, find the values of local minimum that is smaller than its neighbor elements. For example, if x =...

4년 초과 전

문제를 풀었습니다


Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

거의 5년 전

문제를 풀었습니다


Negation the hard way
Write a function that has the following property: f(f(x)) = -x for any numeric array x. Note that there is no restriction on ...

거의 5년 전

문제를 풀었습니다


Distances in a circle
A circle (360°) is given and a row of 6 monotonic increasing numbers with the which difference from last to first value is les...

거의 5년 전

더 보기