Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...
German tank problem
The German tank problem is a well-known statistical problem that attempts to estimate the maximum of a discrete distribution fro...
5개월 전
문제를 풀었습니다
Does the coin touch the line?
If we throw a coin that has a diameter of d, its center will land in a grid n x m.
What is the probability that the coin land...
5개월 전
문제를 풀었습니다
Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of.
I randomly choose an integer ...
5개월 전
문제를 풀었습니다
Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A;
Output: A=(Aij),where each entry Aij is either...
Area of a disk
Find the area of a disk or circle.
x= radius of the disk.
5개월 전
문제를 풀었습니다
Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.
5개월 전
문제를 풀었습니다
Check if sorted
Check if sorted.
Example:
Input x = [1 2 0]
Output y is 0
5개월 전
문제를 풀었습니다
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
5개월 전
문제를 풀었습니다
Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.