abbi031892
BAN USER
Questions (1)
Comments (7)
Reputation 65
- 0of 2 votes
AnswersGiven n positive real numbers, find whether there exists a triplet among this set such that, the sum of the triplet is in the range (1, 2). Do it in linear time and O (1) space.
- abbi031892 in India| Report Duplicate | Flag | PURGE
Directi Software Engineer / Developer 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
last check ....... {1.9,0.2,0.5,0.36}
- abbi031892 February 17, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
I have said positive .....that means no '0' in it ....
- abbi031892 February 17, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
what will your code will do for {1.9,0.2,0.3,0.4} ?
- abbi031892 February 17, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
I might be wrong too.......please repost the code with whitespaces....will help to understand better
- abbi031892 February 17, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
How is it O(n) ??
- abbi031892 February 17, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
@anonymous - Yup he used those constraints
@max - There must be a solution present if he asked
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
it is O(n) requirement ...how you people thinking of sorting ?
- abbi031892 February 19, 2013