8

Insertion sort exists

99% of devs:

Bubble sort for the win!!

Just... use... framework-provided sort! Stop trying to do it yourself!

Comments
  • 7
    Who the fuck writes their own sort outside academics or students?
  • 1
    @TeachMeCode sometimes you gotta do what you gotta do
  • 4
    @TeachMeCode I was asked to do an algorithm for a function that would be called often during a stream, and using insert sort would result in the function being O(n). Otherwise, if you used the built in sort you’d have an O(n log n) function.

    That said this was for an interview. I assume they don’t actually use this shit in their day to day job.
  • 2
    @TeachMeCode the same kinda idiot who invents their own caching system
Add Comment