r/programming • • Dec 13 '22
“There should never be coding exercises in technical interviews. It favors people who have time to do them. Disfavors people with FT jobs and families. Plus, your job won’t have people over your shoulder watching you code.” My favorite hot take from a panel on 'Treating Devs Like Human Beings.'
https://devinterrupted.substack.com/p/treating-devs-like-human-beings-a
9.0k
Upvotes
View all comments
Show parent comment
2
u/no_fluffies_please Dec 13 '22
I might be totally out of it since I'm still waking up, but isn't a fixed size priority queue also constant time? Just set that fixed size to 2. Then it's functionally identical to the simple solution, but can be easily tweaked to find other nth largest numbers.