
Learn to solve interview coding problems using data structures and algorithms in Python, with theory behind solutions and hands-on examples.
Move zeros to the end of the array in place by using two pointers, preserving non-zero order and swapping with a previous index to avoid extra space.
Reverse a string in place using a two-pointer approach, swapping characters from both ends and moving left and right until they meet, achieving O(n) time and O(1) space.
Learn how to invert a binary tree by mirroring nodes in place using a recursive approach, identifying a base case and performing left-right swaps at each node.
Discover the best time to buy and sell stock with a single-pass, running-minimum approach that updates the maximum profit for an efficient O(n) coding interview solution.
Identify a happy number by repeatedly summing the squares of its digits until reaching one, or detect cycles with a set to return false.
Search a binary search tree by comparing the target value to node values; move left for lower and right for higher, returning the subtree rooted at the match.
Explore the single number problem by implementing a map-based solution and then optimize with XOR, identifying the unique element that appears once in a list.
Solve the plus one problem on a non empty digits list by adding one to the last element, propagating carry backward, and inserting a leading one when needed.
Solve the jewels and stones problem by counting how many characters in s appear in the jewel set, treating uppercase and lowercase separately, using a set for fast lookups.
HI THERE!
A good algorithm usually comes together with a set of good data structures that allow the algorithm to manipulate the data efficiently. In this online course, we consider the common data structures that are used in various computational problems. You will learn how these data structures are implemented in different programming languages and will practice implementing them in our programming assignments. This will help you to understand what is going on inside a particular built-in implementation of a data structure and what to expect from it. You will also learn typical use cases for these data structures.
A FEW EXAMPLES OF QUESTIONS THAT WE ARE GOING TO COVER IN THIS COURSE:
What is a good strategy of resizing a dynamic array?
How priority queues are implemented in C++, Java, and Python?
How to implement a hash table so that the amortized running time of all operations is O(1) on average?
What are good strategies to keep a binary tree balanced?
WHAT YOU WILL LEARN
Explain the principles of data structures & how they are used
Create programs that are able to read and write data from files
Store data as key/value pairs using Python dictionaries
Accomplish multi-step tasks like sorting or looping using tuples
SKILLS YOU WILL GAIN
Python Syntax And Semantics
Data Structure
Tuple
Python Programming
GOOD LUCK!