3 ms·
Actually, if you asked in an interview how to sort, I'd try to come up with quicksort or mergesort. I wouldn't give you insertion sort or selection sort becaus
by eli_gottlieb 13y ago
Actually, if you asked in an interview how to sort, I'd try to come up with quicksort or mergesort. I wouldn't give you insertion sort or selection sort because I'd feel terminally embarrassed to go with so bad an answer.
- Groxx 13y agoIs it terminally embarrassing to say "this is bad, but..." and pass the test, then discuss (maybe write out) more advanced options? If all they care about is selection sort, you've saved time (often a good quality). If they care about more, you've demonstrated something, and opened the door for more.
- eli_gottlieb 13y agoDepends. I've been in interviews where they let me damn well know I was losing points for giving an algorithmically sub-optimal answer.
- Groxx 13y agoSounds like (a) fun interview(s) :/ Alas, they exist. I guess it's too much to hope they don't.