Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry, you failed the interview! Your algorithm doesn't terminate, it's no better than an empty infinite loop.

If a list is sorted, then you'd be able to return the largest value. Since that is impossible the correct answer is that it's impossible.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: