
Here is the source code for what is introduced in this course.
Explains comb sort, a bubble-sort variant using a shrinking gap and a swap flag, with a Python implementation that reduces the gap by 1.3 until one.
Demonstrate selection sort with a Python implementation. Learn to find the minimum in the unsorted portion and swap it into place using outer and inner loops.
Explore radix sort, which uses counting sort as a subroutine to sort numbers by each digit (ones, tens, hundreds) in a stable pass.
Learn how binary search quickly finds a target in a sorted list by halving the search range using left, right, and mid indices, with both iterative and recursive Python implementations.
Demonstrates reversing a simple linked list in python using both iterative and recursive approaches, updating node links and head, and validating with a sample zero, one, two, three list.
Sorts a doubly linked list by swapping node data through a while-loop pass, using bubble sort to turn 1 5 2 9 into 1 2 5 9.
Explore the stack data structure by implementing a stack class with push and pop operations on a list, illustrating adding and removing the most recent value.
Master validating JSON format by matching opening and closing brackets with a stack, producing true or false via a Python-based algorithm.
Explore queue concepts by enqueuing at the back and dequeuing from the front, using Python lists or the collections deque for efficient front removals and optional stack behavior.
Explore reversing a queue without using the built-in method by popping values into a new queue with a while loop, then returning and printing the reversed order.
Explore the binary search tree data structure, observe how values branch to the left and right to maintain order, and implement search in code.
Learn to insert nodes into a binary search tree with a node class, left and right children, and a recursive insert function; visualize the structure with examples.
Explore in order traversal of a binary search tree using recursion, printing nodes left-root-right, and implement a recursive search function to locate values such as three, one, or six.
Learn to remove a value from a binary search tree by locating the node, handling cases, and replacing with the smallest right-subtree value, verified by printing the nodes in order.
Explore min heaps and max heaps, build a binary heap from inputs, and apply swaps to maintain heap order, with pop removing the smallest value.
Implement a min-heap in python by building a minyip class with push and pop, heapify up and down, and index helpers for parent, left, and right.
practice solving many coding questions to spot patterns, pause to attempt answers, and memorize solutions when needed; the next lecture introduces coding questions.
"Why do we need to know algorithm?"
For those who are already working in the IT field, you may wonder why we need to know algorithm since you don't use it in your day to day tasks. Not everyone working in the IT field uses algorithms, but let's take a moment to think about why candidates applying for GAFA (Aka Google, Apple, Facebook, Amazon) are always asked interview questions regarding data structures and algorithms.
What type of engineer do you want to be?
As you may know, Google's search function and Tesla's automated driving require top quality performance and that wouldn't be possible without exceptional algorithm efficiency. Therefore, it's important for programmers to have the ability to write codes that can perform well. Of course, if you just want to create a small scale web page using a simple web framework, you won't need to know about algorithm. But services that are popular in our modern society today will face issues with scalability. At the initial stage of creating services, whether the algorithm runs properly or not may be main issue, but as time progresses, the amount of data increases and programmers will have to focus on how to process the data received in a timely manner. That's when the programmer's skills and knowledge are really put to the test.
If you are considering working as an engineer in the Silicon Valley, in most cases (or perhaps all cases), you'll encounter a coding interview portion and without passing this portion of the interview, you won't be hired. Your soft skills may be looked at by the interviewer, but without a solid background and knowledge of algorithm, you won't be able to get the position.
Why should I take this course?
In the first half of this course, we'll be covering the basics of algorithms and data structures using Python. In the latter half, we'll be covering coding questions you may be asked during an actual interview. If you're familiar with the basics of Python, then you'll be able to understand the algorithms and data structures introduced in this course. By the end of this course, we hope you feel more confident and feel prepared to answer coding interview questions.
Happy learning!