DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Rajan Bala's picture

Unregistered

Feeds

aliases

  • Rajan Bala

Rajan Bala

3 years ago

in The Amazon.com Interview — Elliott C. Back on Elliott Back's Blog
I don't get the 4th step from tonic's reply. What do you mean by if value is more than 1 return key, then aren't you prematurely breaking the iteration?

Shouldn't it be if the key is >= 1 then look for a new_key = target -key, and if that also have exist then you return true, and at the end of the loop you would return false?


Thanks,
Rajan
Returning? Login