courses/imposter-video/basic-sorting-algorithms
● videoData Structures and Algorithms

Basic Sorting Algorithms

Free for everyone
This video is free for everyone

Watch the whole thing, no account needed. If it clicks, grab CS Fundamentals on Video for lifetime access to every lesson.

Buy the course$79
SECTION
Data Structures and Algorithms
NEXT UP
DFS, BFS and Binary Tree Search
COURSE
Computer Science Fundamentals
34 lessons
About this lesson

You will likely never have to write a search algorithm, except when you're in an interview. In fact, just yesterday, I was talking to a colleague of mine at Microsoft (a super talented engineer) and he shared with me that he was asked to write a Bubble Sort routine! On a white board!

Interviewers ask this question because they want to see how you write code. If they ask you to write Bubble Sort, consider yourself lucky! They're giving you a softball.

Not everyone can remember this algorithm so be sure to ask questions... it's OK. Also: remember they just want to see how you think through a problem, so chill out and answer as best you can.

Divide and Conquer

As you go through these sorting and searching algorithms, see if you can spot the "divide and conquer" approach being used. This concept is the foundation of so many optimizations in computer science - database indexes, for instance.

Divide and conquer is algorithmic which is a massive improvement over linear time complexity. Do you know what that means and why? We'll get into it!