해결됨

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

30일 전

해결됨

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

약 1달 전

해결됨

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

약 1달 전

문제

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

약 1달 전 | 1

해결됨

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

약 1달 전

해결됨

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

약 1달 전

해결됨

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

약 1달 전

해결됨

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

약 1달 전

문제

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

약 1달 전 | 0

해결됨

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

약 1달 전

해결됨

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]

약 1달 전

해결됨

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

약 1달 전

해결됨

X O X O
On a noughts and crosses board, how many possible unique combinations are there given a square grid of length n? Assumptions/...

약 1달 전

해결됨

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

약 1달 전

해결됨

factorial
calculate x!

약 2달 전

해결됨

Square
square root of x

약 2달 전

해결됨

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

약 2달 전

해결됨

Simple Robotics 2 - End effector attitude
Given a structure as input to your function with the following fields: * robot.links(L1,L2,L3) * robot.jointangles(alfa1,alfa2...

약 2달 전

해결됨

An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?
area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the ...

약 2달 전

해결됨

Open coded lock.
Guess the <hint://fliplr(anchortext) password> or break the <2314/solutions/new#test_suite_body lock>.

약 2달 전

해결됨

make histogram
You probably know the function hist(x,n) to get the histogram. Now try to write the function yourself! For the cheaters wanti...

약 2달 전

해결됨

Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

약 2달 전

해결됨

D'Hondt Method of Proportional-Representation
The D'Hondt method is a proportional representational method for allocating seats to parties in an election. <https://en.wiki...

약 2달 전

해결됨

Hamming Weight - Size Scoring
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

약 2달 전

해결됨

Fraction of a fraction of a ...
One sort of brainteaser problem is a math problem wherein you are asked what the given fraction of a fraction of a ... number is...

약 2달 전

해결됨

Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

약 2달 전

해결됨

Squares in Squares - Concentric Squares
Given a number, n, create an n x n sized matrix with concentric squares of 1s from the outside in. There should be a gap between...

약 2달 전