Find the Oldest Person in a Room
Given two input vectors:
* |name| - user last names
* |age| - corresponding age of the person
Return the name of the ol...
Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners
Points = [x, y];
Triangle = [x1, y1; x...
대략 4년 전
문제를 풀었습니다
Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1.
example:
x=4
ans=
[1 1 1 0
1 0 0 1
1 0 0 1
1 1 1 0]
대략 4년 전
문제를 풀었습니다
Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 1
1 0 0 0 0
...
대략 4년 전
문제를 풀었습니다
Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 .
example:
n=4
ans=
[1 1 1 1
1 0 0 1
...
대략 4년 전
문제를 풀었습니다
Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ .
Example:
n=5
ans=
[1 1 1 1 1
0 0 0 1 ...
대략 4년 전
문제를 풀었습니다
Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1.
example:
n=3
ans=
[0 1 0
0 1 0
0 1 0]
n=...
대략 4년 전
문제를 풀었습니다
Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...