DEV Community

Cover image for Exponentially Easy Selection Sort

Exponentially Easy Selection Sort

Vaidehi Joshi on May 16, 2017

Remember when we first began our adventure into sorting algorithms last week, and how we learned about the multiple ways one can break down and cla...
Collapse
 
sishaarrao profile image
Sishaar Rao

Awesome explanation of selection sort! Especially love the handdrawn diagrams + notes as well as the explanation of O(n) complexities and why we care about it. In today's time where most of us hit array.sort() it's cool to take a step back and remember what is going on behind the scenes.

Collapse
 
amreis profile image
Álister Machado dos Reis

A great post, I like the way you explain it with a simple background and in a friendly, easy to read way.
Only one thing, a complexity of O( N^2 ) is quadratic, not exponential (the latter would be something like O( 2^N ), which is way worse).

Keep up the good work!

Collapse
 
vaidehijoshi profile image
Vaidehi Joshi

Great catch! That was a silly mistake on my part -- thanks for pointing that out. I just updated the post 😊

Collapse
 
s3artis profile image
Matt Weingaertner

Great Post! Thank you.
BTW, are you using Rocketbook for your Notes?

Collapse
 
vaidehijoshi profile image
Vaidehi Joshi

Nope -- I handwrite them all and use CamScan to scan them.

Collapse
 
ben profile image
Ben Halpern

Another great post!

Collapse
 
vaidehijoshi profile image
Vaidehi Joshi

Thank you!💕