Course Highlights
  • Learn, implement, and use different Data Structures
  • Learn, implement and use different Algorithms
  • Become a better developer by mastering computer science fundamentals
  • Learn everything you need to ace difficult coding interviews
  • Cracking the Coding Interview with 100+ questions with explanations
  • Time and Space Complexity of Data Structures and Algorithms
  • Recursion
  • Big O
Curriculum

11 Topics
Curriculum Walkthrough
What is a Data Structure?
What is an algorithm?
Why are Data Structures and Algorithms important?
Types of Data Structures
Types of Algorithms
Python Programming For Everyone
Introduction to DS and Algorithms
Student Community
Lecture Notes
Code Editor

14 Topics
What is Big O?
Big O Notations - Theta Omega and Big O
Big O - O(1)
Big O - O(N)
Drop Constants
Big O - O(n^2)
Drop Non Dominant Terms
Big O - O(logN)
Space Complexity
Different Terms for Input - Add vs Multiply
How to measure the codes using Big O?
Time Complexities
Download the Resources
Feedback Time

21 Topics
What is an Array?
Types of Array
Arrays in Memory
Create an Array
Insertion to Array
Traversal Operation
Accessing an element of Array
Searching for an element in Array
Deleting an element from Array
Time and Space Complexity of One Dimensional Array
One Dimensional Array Practice
Create Two Dimensional Array
Insertion - Two Dimensional Array
Accessing an element of Two Dimensional Array
Traversal - Two Dimensional Array
Searching for an element in Two Dimensional Array
Deletion - Two Dimensional Array
Time and Space Complexity of 2D Array
When to use/avoid array
Download the Resources
Feedback Time

15 Topics
What is a List? How to create it?
Accessing/Traversing a list
Update/Insert a List
Slice/Delete from a List
Searching for an element in a List
List Operations/Functions
Lists and strings
Common List pitfalls and ways to avoid them
Lists vs Arrays
Time and Space Complexity of List
List Comprehension
Conditional List Comprehension
List Interview Questions
Download the Resources
Feedback Time

3 Topics
Goals - what you will make by the end of this section
Calculate Average Temperature
Find the Days Above Average Temperature

25 Topics
Missing Number
Solution to Missing Number
Missing Number Explanation
Pairs / Two Sum - LeetCode 1
LeetCode Solution
Finding a number in an Array
Max Product of Two Integers
SOLUTION - Time and Space Complexity of Max Product of Two Integers
Middle Function
SOLUTION - Time and Space Complexity of Middle Function
2D Lists
SOLUTION - Time and Space Complexity of 2D Lists
Best Score
SOLUTION - Time and Space Complexity of Best Score
Duplicate Number
SOLUTION - Time and Space Complexity of Duplicate Number
Pairs
SOLUTION - Time and Space Complexity of Pairs
Contains Duplicate
SOLUTION - Time and Space Complexity of Contains Duplicate
Permutation
Rotate Matrix/ Image - LeetCode 48
SOLUTION - Time and Space Complexity of Rotate Matrix/Image
Download the Resources
Feedback Time

9 Topics
Question 1 - Product and Sum
Question 2 - Print Pairs
Question 3 - Print Unordered Pairs
Question 4 - Print Unordered Pairs 2 Arrays
Question 5 - Print Unordered Pairs 2 Arrays 100000 Units
Question 6 - Reverse
Question 7 - O(N) Equivalents
Download the Resources
Feedback Time

15 Topics
What is a Dictionary?
Create a Dictionary
Dictionaries in memory
Insert /Update an element in a Dictionary
Traverse through a Dictionary
Search for an element in a Dictionary
Delete/ Remove an element from a Dictionary
Dictionary Methods
Dictionary Operations / Builtin Functions
Dictionary vs List
Time and Space Complexity of a Dictionary
Dictionary Comprehension
Dictionary Quiz
Download the Resources
Feedback Time

12 Topics
Count Word Frequency
SOLUTION - Time and Space Complexity of Count Word Frequency
Common Keys
SOLUTION - Time and Space Complexity of Common Keys
Key with the Highest Value
SOLUTION - Time and Space Complexity of Key with the Highest Value
Reverse Key-Value Pairs
SOLUTION - Time and Space Complexity of Reverse Key-Value Pairs
Conditional Filter
SOLUTION - Time and Space Complexity of Conditional Filter
Same Frequency
SOLUTION - Time and Space Complexity of Same Frequency

10 Topics
What is a Tuple? How to create it?
Tuples in Memory / Accessing an element of Tuple
Traversing a Tuple
Search for an element in Tuple
Tuple Operations/Functions
Tuple vs List
Time and Space complexity of Tuples
Tuple Questions
Download the Resources
Feedback Time

12 Topics
Sum and Product
SOLUTION - Time and Space Complexity of Sum and Product
Elementwise Sum
SOLUTION - Time and Space Complexity of Elementwise Sum
Insert at the Beginning
SOLUTION - Time and Space Complexity of Insert at the Beginning
Concatenate
SOLUTION - Time and Space Complexity of Concatenate
Diagonal
SOLUTION - Time and Space Complexity of Diagonal
Common Elements
SOLUTION - Time and Space Complexity of Common Elements

6 Topics
What is OOP? Why we need it in this course?
OOP Concepts
Create Objects and Access Attributes and Methods
Classes
Class Attributes
Class Methods

22 Topics
What is a Linked List?
Linked List vs Lists/Arrays
Types of Linked List
Linked List in the Memory
Node Class Constructor
Linked List Constructor - Creation of Singly Linked List
Insertion in Singly Linked List in Memory
Insert an Element at the end of Singly Linked List - Append method
Print Linked List - __str__
Insert an Element at the beginning of Singly Linked List - Prepend method
Insert Method in Singly Linked List
Traversal of Singly Linked List
Search Method in Singly Linked List
Get Method in Singly Linked List
Set Method in Singly Linked List
Pop First Method in Singly Linked List
Pop Method in Singly Linked List
Remove Method in Singly Linked List
Delete All Nodes of Singly Linked List
Time and Space Complexity of Singly Linked List
Download the Resources
Feedback Time

14 Topics
Create Simple Singly Linked List DS
Solution to Create SLL DS
Insertion at the Beginning of a Singly Linked List
Solution - Insertion at the Beginning of a Singly Linked List
Insertion at the End of a Singly Linked List
Solution - Insertion at the End of a Singly Linked List
Deletion from a Singly Linked List
Solution - Deletion from a Singly Linked List
Reverse a Singly Linked List
Solution - Reverse a Singly Linked List
Middle of a Singly Linked List
Solution - Middle of Singly Linked List
Remove Duplicates from a Singly Linked List
Solution - Remove Duplicates from a Singly Linked List

12 Topics
Merge Two Sorted Linked List
Solution - Merge Two Sorted Linked List
Remove Duplicates
Solution to Remove Duplicates
Remove Linked List Elements
Solution to Remove Linked List Elements
Reverse Linked List
Solution to Reverse Linked List
Palindrome Linked List
Solution to Palindrome Linked List
Middle of the Linked List
Solution to Middle of the Linked List

14 Topics
What is Circular Singly Linked List? CSLL Class
Append Method - Circular Singly Linked List
Print Circular Singly Linked List
Prepend Method - Circular Singly Linked List
Insert Method - Circular Singly Linked List
Traversal of Circular Singly Linked List
Search Method - Circular Singly Linked List
Get Method - Circular Singly Linked List
Set Method - Circular Singly Linked List
Pop First Method - Circular Singly Linked List
Pop Method - Circular Singly Linked List
Remove Method - Circular Singly Linked List
Delete All Nodes Circular Singly Linked List
Time and Space Complexity of Circular Singly Linked List

15 Topics
IMPORTANT NOTE
What is Doubly Linked List? Node Class Constructor
Append Method in Doubly Linked List
__str__ Method DLL
Prepend Method Doubly Linked List
Traverse Method Doubly Linked List
Reverse Traverse Method Doubly Linked List
Search Method Doubly Linked List
Get Method Doubly Linked List
Set Method Doubly Linked List
Insert Method Doubly Linked List
Pop First Method Doubly Linked List
Pop Method Doubly Linked List
Remove Method Doubly Linked List
Time and Space Complexity of Doubly Linked List

12 Topics
Creation of Circular Doubly Linked List
Insertion in Circular Doubly Linked List
Insertion Algorithm in Circular Doubly Linked List
Insertion Method in Circular Doubly Linked List
Traversal of Circular Doubly Linked List
Reverse Traversal of Circular Doubly Linked List
Search for a node in Circular Doubly Linked List
Delete a node from Circular Doubly Linked List
Deletion Algorithm in Circular Doubly Linked List
Deletion Method in Circular Doubly Linked List
Delete Entire Circular Doubly Linked List
Time and Space Complexity of Circular Doubly Linked List

9 Topics
Linked List Class
Remove Duplicates
Solution to Remove Duplicates
Question 2 - Return Kth to Last
Question 3 - Partition
Question 4 - Sum Linked Lists
Question 5 - Intersection
Download the Resources
Feedback Time

12 Topics
What is a Stack?
Stack Operations
Create Stack using List without size limit
Operations on Stack using List (push pop peek isEmpty Delete)
Create Stack with limit (pop push peek isFull isEmpty delete)
Create Stack using Linked List
Operation on Stack using Linked List (pop push peek isEmpty delete)
Time and Space Complexity of Stack using Linked List
When to use/avoid Stack
Stack Quiz
Download the Resources
Feedback Time

15 Topics
What is Queue?
Queue using Python List - no size limit
Queue using Python List - no size limit operations (enqueue dequeue peek)
Circular Queue - Python List
Circular Queue - Python List Operations (enqueue dequeue peek delete)
Queue - Linked List
Queue - Linked List Operations (Create Enqueue)
Queue - Linked List Operations (Dequeue() isEmpty Peek)
Time and Space complexity of Queue using Linked List
List vs Linked List Implementation
Collections Module
Queue Module
Multiprocessing module
Download the Resources
Feedback Time

7 Topics
Question 1 - Three in One
Question 2 - Stack Minimum
Question 3 - Stack of Plates
Question 4 - Queue via Stacks
Question 5 - Animal Shelter
Download Resources
Feedback Time

11 Topics
What is Recursion?
Why do we need recursion?
How Recursion works?
Recursive vs Iterative Solutions
When to use/avoid Recursion?
How to write Recursion in 3 steps?
How to find Fibonacci numbers using Recursion?
How to find time complexity for Recursive calls?
How to measure Recursive Algorithms that make multiple calls?
Download the Resources
Feedback Time

6 Topics
Question 1 - Sum of Digits
Question 2 - Power
Question 3 - Greatest Common Divisor
Question 4 - Decimal To Binary
Download the Resources
Feedback Time

19 Topics
Important Note!
power
factorial
productofArray
recursiveRange
fib
SOLUTIONS PART 1
reverse
isPalindrome
someRecursive
flatten
SOLUTIONS PART 2
captalizeFirst
nestedEvenSum
capitalizeWords
stringifyNumbers
collectStrings
SOLUTION PART 2
Download the Resources

29 Topics
What is a Tree?
Why Tree?
Tree Terminology
How to create basic tree in Python?
__str__ function for Tree - Explanation
Binary Tree
Types of Binary Tree
Binary Tree Representation
Create Binary Tree (Linked List)
PreOrder Traversal Binary Tree (Linked List)
InOrder Traversal Binary Tree (Linked List)
PostOrder Traversal Binary Tree (Linked List)
LevelOrder Traversal Binary Tree (Linked List)
Searching for a node in Binary Tree (Linked List)
Inserting a node in Binary Tree (Linked List)
Delete a node from Binary Tree (Linked List)
Delete entire Binary Tree (Linked List)
Create Binary Tree (Python List)
Insert a value Binary Tree (Python List)
Search for a node in Binary Tree (Python List)
PreOrder Traversal Binary Tree (Python List)
InOrder Traversal Binary Tree (Python List)
PostOrder Traversal Binary Tree (Python List)
Level Order Traversal Binary Tree (Python List)
Delete a node from Binary Tree (Python List)
Delete Entire Binary Tree (Python List)
Linked List vs Python List Binary Tree
Download the Resources
Feedback Time

10 Topics
What is a Binary Search Tree? Why do we need it?
Create a Binary Search Tree
Insert a node to BST
Traverse BST
Search in BST
Delete a node from BST
Delete entire BST
Time and Space complexity of BST
Download the Resources
Feedback Time

16 Topics
What is an AVL Tree?
Why AVL Tree?
Common Operations on AVL Trees
Insert a node in AVL (Left Left Condition)
Insert a node in AVL (Left Right Condition)
Insert a node in AVL (Right Right Condition)
Insert a node in AVL (Right Left Condition)
Insert a node in AVL (all together)
Insert a node in AVL (method)
Delete a node from AVL (LL LR RR RL)
Delete a node from AVL (all together)
Delete a node from AVL (method)
Delete entire AVL
Time and Space complexity of AVL Tree
Download the Resources
Feeback Time

8 Topics
What is Binary Heap? Why do we need it?
Common operations (Creation Peek sizeofheap) on Binary Heap
Insert a node in Binary Heap
Extract a node from Binary Heap
Delete entire Binary Heap
Time and space complexity of Binary Heap
Download the Resources
Feedback Time

8 Topics
What is a Trie? Why we need it?
Common Operations on Trie (Creation)
Insert a string in Trie
Search for a string in Trie
Delete a string from Trie
Practical use of Trie
Download the Resources
Feedback Time

10 Topics
What is Hashing? Why we need it?
Hashing Terminology
Hash Functions
Types of Collision Resolution Techniques
Hash Table is Full
Pros and Cons of Resolution Techniques
Practical Use of Hashing
Hashing vs Other DS
Download the Resources
Feedback Time

17 Topics
What is Sorting?
Types of Sorting
Sorting Terminologies
Bubble Sort
Selection Sort
Insertion Sort
Bucket Sort
Bucket Sort with Negative Numbers
Merge Sort
QuickSort Overview
Pivot Function Overview
Pivot Function Implementation
QuickSort Algorithm Implementation
Heap Sort
Comparison of Sorting Algorithms
Download Resources
Feedback Time

7 Topics
Introduction to Searching Algorithms
Linear Search
Linear Search in Python
Binary Search
Binary Search in Python
Time Complexity of Binary Search
Download Resources

11 Topics
What is a Graph? Why Graph?
Graph Terminology
Types of Graph
Graph Representation
Create a graph using Python
Create Graph using Python - Add Vertex
Add Edge
Remove Edge
Remove Vertex
Feedback Time
Download Resources

6 Topics
Graph Traversal - Breadth First Search (BFS)
Breadth First Search (BFS) in Python
Graph Traversal - Depth First Search (DFS)
DFS Traversal in Python
BFS Traversal vs DFS Traversal
Download Resources

4 Topics
Topological Sort
Topological Sort Algorithm
Topological Sort in Python
Download Resources

6 Topics
Single Source Shortest Path Problem (SSSPP)
BFS for SSSPP
BFS for SSSPP in Python
Why does BFS not work with weighted Graph?
Why does DFS not work for SSSP?
Download Resources

7 Topics
Dijkstra's Algorithm for SSSP
Dijkstra's Algorithm Visualization
Dijkstra Implementation Part 1
Dijkstra Implementation Part 2
Dijkstra Algorithm Testing
Dijkstra Algorithm with negative cycle
Download Resources

6 Topics
Bellman Ford Algorithm
Bellman Ford Algorithm with negative cycle
Why Bellman Ford runs V-1 times?
Bellman Ford in Python
BFS vs Dijkstra vs Bellman Ford
Download Resources

2 Topics
All pairs shortest path problem
Dry run for All pair shortest path

6 Topics
Floyd Warshall Algorithm
Why Floyd Warshall?
Floyd Warshall with negative cycle
Floyd Warshall in Python
BFS vs Dijkstra vs Bellman Ford vs Floyd Warshall
Download Resources

4 Topics
Minimum Spanning Tree
Disjoint Set
Disjoint Set in Python
Download Resources

6 Topics
Kruskal Algorithm
Kruskal Algorithm in Python
Prim's Algorithm
Prim's Algorithm in Python
Prim's vs Kruskal
Download Resources

18 Topics
Introduction
Route Between Nodes
Solution to Route Between Nodes
Minimal Tree
Solution to Minimal Tree
List of Depths
Solution to List of Depths
Check Balanced - LeetCode 110
Solution to Check Balanced
Validate BST - LeetCode 98
Solution to Validate BST - LeetCode 98
In-order Successor in BST - LeetCode 285
Solution to Successor
Build Order
Solution to Build Order
First Common Ancestor - LeetCode 236
Solution to First Common Ancestor
Download Resources

9 Topics
What is Greedy Algorithm?
Greedy Algorithms (Insertion Sort Selection Sort Prim Kruskal Topological )
Activity Selection Problem
Activity Selection Problem in Python
Coin Change Problem
Coin Change Problem in Python
Fractional Knapsack Problem
Fractional Knapsack Problem in Python
Download the Resources

20 Topics
What is a Divide and Conquer Algorithm?
Common Divide and Conquer algorithms
How to solve Fibonacci series using Divide and Conquer approach?
Number Factor
Number Factor in Python
House Robber
House Robber Problem in Python
Convert one string to another
Convert One String to another in Python
Zero One Knapsack problem
Zero One Knapsack problem in Python
Longest Common Sequence Problem
Longest Common Subsequence in Python
Longest Palindromic Subsequence Problem
Longest Palindromic Subsequence in Python
Minimum cost to reach the Last cell problem
Minimum Cost to reach the Last Cell in 2D array using Python
Number of Ways to reach the Last Cell with given Cost
Number of Ways to reach the Last Cell with given Cost in Python
Download the Resources

18 Topics
What is Dynamic Programming? (Overlapping property)
Where does the name of DP come from?
Top Down with Memoization
Bottom Up with Tabulation
Top Down vs Bottom Up
Is Merge Sort Dynamic Programming?
Number Factor Problem using Dynamic Programming
Number Factor : Top Down and Bottom Up
House Robber Problem using Dynamic Programming
House Robber : Top Down and Bottom Up
Convert one string to another using Dynamic Programming
Convert String using Bottom Up
Solution to Convert String using Bottom Up
Zero One Knapsack using Dynamic Programming
Zero One Knapsack - Top Down
Solution to Zero One Knapsack - Top Down
Zero One Knapsack - Bottom Up
Solution to Zero One Knapsack - Bottom Up

19 Topics
NOTE ON THIS SECTION
Longest repeated Subsequence Length problem
Solution to Longest repeated Subsequence Length problem
Longest Common Subsequence Length problem
Solution to Longest Common Subsequence Length problem
Longest Common Subsequence problem
Solution to Longest Common Subsequence problem
Diff Utility
Solution to Diff Utility
Shortest Common Supersequence Problem
Solution to Shortest Common Supersequence Problem
Length of Longest Palindromic Subsequence
Solution to Length of Longest Palindromic Subsequence
Subset Sum Problem
Solution to Subset Sum Problem
Egg Dropping Puzzle
Solution to Egg Dropping Puzzle
Maximum Length Chain of Pairs
Solution to Maximum Length Chain of Pairs

6 Topics
Introduction
Step 1 - Understand the problem
Step 2 - Examples
Step 3 - Break it Down
Step 4 - Solve or Simplify
Step 5 - Look Back and Refactor

6 Topics
VERY IMPORTANT NOTE! PLEASE READ!
What is Backtracking?
Backtracking vs Brute Force Approach
Backtracking
N - Queens Problem
N - Queens Problem in Python

57 Topics
VERY IMPORTANT NOTE! PLEASE READ!
Singly Linked List - Push
Solution to Singly Linked List - Push
Singly Linked List - Pop
Solution to Singly Linked List - Pop
Singly Linked List - Get
Solution to Singly Linked List - Get
Singly Linked List - Insert
Solution to Singly Linked List - Insert
Singly Linked List - Rotate
Solution to Singly Linked List - Rotate
Singly Linked List - Set
Solution to Singly Linked List - Set
Divide and Conquer - countZeroes
Solution to Divide and Conquer - countZeroes
Divide and Conquer - sortedFrequency
Solution to Divide and Conquer - sortedFrequency
Divide and Conquer - findRotatedIndex
Solution to Divide and Conquer - findRotatedIndex
Singly Linked List - Remove
Solution to Singly Linked List - Remove
Insertion Sort
Solution to Insertion Sort
Bubble Sort
Solution to Bubble Sort
Sorting with Pivot : Quicksort
Solution to Sorting with Pivot : Quicksort
Stack - Push
Solution to Stack - Push
Stack - Pop
Solution to Stack - Pop
Stack with Two Queues
Solution to Stack with Two Queues
Queue - Enqueue
Solution to Queue - Enqueue
Binary Search Tree - Insert
Solution to Binary Search Tree - Insert
Binary Search Tree - Find
Solution to Binary Search Tree - Find
Binary Search Tree - DFSPreOrder
Solution to Binary Search Tree - DFSPreOrder
Binary Search Tree - DFSInOrder
Solution to Binary Search Tree - DFSInOrder
Binary Search Tree - DFSPostOrder
Solution to Binary Search Tree - DFSPostOrder
Binary Search Tree - Remove
Solution to Binary Search Tree - Remove
Binary Search Tree - Check If Balanced
Solution to Binary Search Tree - Check If Balanced
Max Binary Heap - Insert
Solution to Max Binary Heap - Insert
Min Binary Heap - Insert
Solution to Min Binary Heap - Insert
Max Binary Heap - Extract Max
Solution to Max Binary Heap - Extract Max
Graph - Add Vertex
Solution to Graph - Add Vertex

1 Topic
Bonus Lecture

  Write a Review

The Complete Data Structures and Algorithms Course in Python

Go to Paid Course