mk
BAN USER
Questions (1)
Comments (3)
Reputation -5
- 0of 0 votes
AnswersGive an algorithm to compute the root square of real number using basic math operations.
- mk in United States| Report Duplicate | Flag | PURGE
Algorithm
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
It is correct, but we can search faster using the binary search. if we have population such as n1, n2, ... we can make the sequence a1=n1, a2=n1+n2, a3=n1+n2+n3, .... an then store all ai values in a binary search tree. then we select a random number between 0 to N=n1+n2+.. = an and search that number in the tree. the associated range can be found by looking at the final node and its parent which can give us the associated country.
- mk September 06, 2012Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- mk January 17, 2015