문제를 풀었습니다


Generate Golomb's sequence
Generate Golomb's sequence up to the given number. If n=4, then seq = [1, 2, 2, 3, 3, 4, 4, 4] If n=6, then s...

3개월 전

문제를 풀었습니다


generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

3개월 전

문제를 풀었습니다


Wythoff Sequence
Find the lower Wythoff sequence up to n. For more information, <https://oeis.org/A000201>

3개월 전

문제를 풀었습니다


Adjoint matrix
given a matrix a, find the adjoint matrix of a.

3개월 전

문제를 풀었습니다


cofactor matrix
given a matrix, find its cofactor matrix <https://en.wikipedia.org/wiki/Minor_(linear_algebra)#Inverse_of_a_matrix>

3개월 전

문제를 풀었습니다


Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function. its an extension...

3개월 전

문제를 풀었습니다


AES MixColumns() Transformation
Given a 16x2 input character hexadecimal array representing the AES state, execute the AES algorithm MixColumns() transformation...

3개월 전

문제를 풀었습니다


another bullseye
create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

3개월 전

문제를 풀었습니다


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.

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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.

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


Determine whether a given point is inside or outside a polygon
A closed polygon may be described by an N x 2 array of nodes, where the last node and the first node are the same. Each row of t...

3개월 전

문제를 풀었습니다


Reepeating numbers in array
Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


Fun with permutations
There are factorial(N) permutations of the numbers from 1 to N. For each of these permutations, we can find the set of indexes j...

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


Combinations using Stirling numbers of the second kind
Output the number of ways to distribute n labelled balls among k identical boxes (some of which might be empty). Example: ...

3개월 전

문제를 풀었습니다


factorial
calculate x!

3개월 전

문제를 풀었습니다


Square
square root of x

3개월 전

문제를 풀었습니다


Takuzu row
Takuzu row is one row in a logic puzzle of a rectangular grid. The rules are as follows: (1) The row is filled with 1s and 0s...

3개월 전

문제를 풀었습니다


All flights lead to Idaho Falls
Using spherical trigonometry and great circle paths, determine the distance (in kilometers) and the initial flight heading (from...

3개월 전

문제를 풀었습니다


The length of the equal sides of an isoceles triangle is 'a'.For all the possible (integer) values of the remaining side,find the associated angles between the two equal sides.
the remaining side may have many possible values.only assume integer ones for simplicity.

3개월 전

더 보기