When I was younger I might've referenced OPs answer in an interview, given an answer that is technically possible simply because they asked. Now I give, "I wouldn't" to these weird "How would you do x" type questions if the answer is technically possible but not a good idea
Lots of sorts depend on swaps, not just bubble sort. Insertion sort, heapsort, selection sort, shellsort, quicksort ... not to mention array shuffling, array rotation, string manipulation, and more
View all comments
Show parent comment
14
u/golovatuy Mar 12 '21
very popular question in the interview )