Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99.
E...
1 year 前
已解决
Find the palindrome
Given the string a, find the longest palindromic sub-string b.
So when
a = 'xkayakyy';
you should return
b = 'kayak';
1 year 前
已解决
Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...
1 year 前
已解决
Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not.
Return True if it is an Armstrong Number. An n-Dig...
1 year 前
已解决
The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...
1 year 前
已解决
Compute Fibonacci Number
Compute the n-th Fibonacci Number
f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296
Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...
1 year 前
已解决
There are 10 types of people in the world
Those who know binary, and those who don't.
The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...
Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector).
Example:
Inpu...
1 year 前
已解决
Relative ratio of "1" in binary number
Input(n) is positive integer number
Output(r) is (number of "1" in binary input) / (number of bits).
Example:
* n=0; r=...