All Questions
Tagged with mathematics binary-search
3 questions
4
votes
1
answer
830
views
Compute the square root of a positive integer using binary search
The requirement is to find the square root of a positive integer using binary search and the math property that square root of a number n is between ...
4
votes
1
answer
224
views
Rare binary numbers
Rare numbers are the natural numbers in their binary forms in which there aren't two (or more) ones next to each other. Make a program that will give the N. rare number!
For example:
In case of N = ...
6
votes
2
answers
10k
views
Finding greatest value in array smaller than x
Code review requested to make this code simpler, cleaner, and better. Input array is sorted.
This program finds the greatest number smaller than x. So, in an ...