Engrain by ByteRush

DSA.04.01 JuniorCore — asked often

Elementary sorts and stability

Comes up in: DSA, Recruiter screen

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • bubble, selection, insertion sort
  • stable vs unstable
  • in-place
  • insertion sort on nearly sorted data

Words you will know

stable sortin-place sort

What you will practise

  • implement insertion sort
  • visual trace

Interview questions this answers

  • What algorithm does V8 use for sort?
  • Why does [10, 9, 1].sort() return [1, 10, 9]?