Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...
6 years ago
Solved
Duplicate a character
Duplicate a character 'n' times.
Example 1: str='a' n=5
output='aaaaa'
Example 2: str='*' n=3
output='***'
6 years ago
Solved
Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero.
Example:...
6 years ago
Solved
Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').
6 years ago
Solved
cos for boss?
a programmer had too much coffee and his boss needs cos(alpha+beta) correctly, especially when alpha or beta are close to pi/2 a...
6 years ago
Solved
0<=x<=pi?
Check whether the given angle is between zero and pi.
Return logical true or false.
6 years ago
Solved
Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme:
* The bar code is made from the binary versio...