arrow_upward
close Christmas Tree ✨ Join the LeakedBB 2024 Celebration Christmas Contest Today! Win up to $3500 in crypto-currency. ✨
☃️ Deck the halls and get ready to jingle all the way to a crypto-currency jackpot! ☃️
Don't miss out on the fun—Click Here to learn how you can join for free and make this holiday season truly special!
How to remember basic sorting algorithms?
#1
the code is confusing to remember, especially trying to keep track of indexes and pivots.



#2
Don't try to memorize the code line for line. Try to understand the concept and the mechanism behind the algorithm. If you understand that you'll be able to re-piece it back together.

Is this for an interview? If it's general use just google it when you need Big Grin



#3
Yea.. understanding how it works tends to be better easy to put the code together



#4
The names of the algorithms should be descriptive enough to remind you what they are meant to do
Insertion sort inserts
bubble sort bubbles up
selection sort selects the right element
...
quick sort is quick xD



#5
If you dont know what you're doing, then even remembering line for line isnt going to help. Just try to understand how everything works so it's easier to recall. Besides theres no fun in just remembering.