Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
2 months ago
Solved
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false.
Example...
2 months ago
Solved
Number of 1s in a binary string
Find the number of 1s in the given binary string.
Example. If the input string is '1100101', the output is 4. If the input stri...
2 months ago
Solved
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
2 months ago
Solved
Pi Estimate 1
Estimate Pi as described in the following link:
<http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>