3 ms·
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 retur
by nutjob2 7y ago
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.