Data Structures and Algorithms (DSA) in Python - Self Paced

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

DATA STRUCTURE - BASICS DATA STRUCTURE - ADVANCED

TRACK NAME VIDEOS PROBLEMS VIDEOS PROBLEMS

Analysis of Algorithms (Background)


Asymptotic Analysis
Order of Growth
Best, Average and Worst Cases
Asymptotic Notations
Big O Notation
Omega Notation
Analysis of Algorithms
Theta Notation
Analysis of Common Loops
Analysis of multiple loops
Analysis of Recursion
Recursion Tree method for solving recurrences
More example recurrences
Upper bound using Recursion tree method
Space Complexity

Python DSA - Count Digits Absolute Value


Palindrome Number Convert Celsius To Fahrenheit
Factorial of a number Quadratic Equation Roots
Trailing Zeros in Factorial Factorial Of Number
GCD and HCF of two numbers Digits In Factorial
LCM of two numbers GP Term
Mathematics
Check for Prime Primality Test
Prime Factors Exactly 3 Divisors
All Divisors of a Number Addition Under Modulo
Sieve of Eratosthenes Multiplication Under Modulo
Computing Power Modular Multiplicative Inverse
Iterative Power

Bitwise Operator in Python - Part 1 Find first set bit


Bitwise Operator in Python - Part 2 Rightmost different bit
Check Kth bit is set or not Check whether K-th bit is set or not
Count Set Bits Count total set bits
Power of Two Bit Difference
One Odd Occuring Number is sparse or not
Bit Magic
Two Odd Occuring Longest Consecutive 1's
Power Set Using Bitwise Binary To Gray Code equivalent
Gray to Binary equivalent
Power of 2
Swap all odd and even bits
Maximum AND Value

List (Dynamic Sized Array) Introduction Array insert at end Left Rotate by d Places Smallest Positive Missing Number
Working of List in Python Array insert at index Maximum difference Rearrange array alternately
Average or Mean of a List Get Element At Index Stock Buy &Sell Part 2 Rearrange an array with O(1) extra space
Separate Even and Odd Array Update At Index Trapping Rainwater Maximum index
Get Smaller Elements Array Delete And Shift Maximum Consecutive 1s Trapping Rainwater
Slicing (List,Tuple And String) Count Smaller Than X Longest even odd subarray Stock buy and sell
Comprehensions in Python Count Elements Greater Than X Majority element Check is array is rotated and sorted
Largest Element in a List Find Immediate Smaller Than X Minimum Consecutive flips Kadane's Algorithm
List Second Largest Element in a list Find Immediate Greater Than X Sliding Window Technique Longest Subarray of even and odd
Check if a list is Sorted Who has the majority? Maximum subarray sum Game of chocolates
Find the only Odd Maximum and Minimum In Array Maximum circular sum subarray Divide and Subtract Game
Reverse a List in Python Reverse The Array Prefix Sum Technique Max Circular subarray Sum
Remove duplicates from sorted array Rotate Array
Move Zeros to End Sum of Array Elements
Leaders in an Array problem Mean And Median of Array
Frequencies in a sorted array Is Array Sorted
Left Rotate a List by one

Applications of Recursion Print 1 To N Without Loop Subset of a given string Tower Of Hanoi
Writing Base Cases in Recursion Factorial Using Recursion Printing all Permutations Power Using Recursion
Tail Recursion Count Total Digits in a Number Tower of Hanoi in Python Power Of Numbers
Practice For Recursion (Part 1) Sum of Digits of a Number Josephus Problem in Python Power Set Using Recursion
Practice For Recursion (Part 2) Recursively Sum N Numbers Subset sum problem Possible Words From Phone Digits
Recursion Print N to 1 using Recursion in Python Fibonacci Using Recursion Rope Cutting Problem
Print 1 to N using Recursion in Python The Sequence
Sum of Natural Numbers Using Recursion Find nCr
Sum Of Digits Using Recursion Check Palindrome
Palindrome Check using Recursion GCD Euclid
Print Array Elements Using Recursion

Binary Search in Python Search an Element in an array Search in Sorted Rotated Array Square root of a number
Recursive Binary Search in Python Searching an element in a sorted array Median of two sorted arrays Majority Element
Analysis of Binary Search Count 1's in binary array Repeating Elements Part (1) Minimum Number in a sorted rotated array
Searching Index of first occurrence in a sorted array Left Index Repeating Elements Part (2) Two Repeated Elements
Index of Last Occurrence Peak element Allocate Minimum Pages (Naive Method) Roof Top
Count Occurrences in a Sorted Array Floor in a Sorted Array Allocate Minimum Pages (Binary Search) Maximum Water Between Two Buildings
Count 1s in a Sorted Binary Array Smallest Positive missing number
Count only Repeated
Count More than n/k Occurences
Allocate minimum number of pages
Subarray with given sum
Median of Two sorted arrays

Sorting in Python Bubble Sort Tail Call Elimination in Quick Sort Union of Two Sorted Arrays
List Sort in Python Insertion Sort Kth Smallest Intersection of two sorted arrays
Sorted in Python Quick Sort Minimum Difference in an Array Count the number of possible triangles
Stability in Sorting Algorithm Binary Array Sorting Chocolate Distribution Problem Find triplets with zero sum
Bubble Sort Count Inversions Sort an array with two types of element Three way partitioning
Selection Sort Sort an array with three types of elements Counting Sort
Insertion Sort in Python Merge overlapping intervals Closet 0s 1s and 2s
Merge Sort Algorithm Meeting the maximum guests Sort by Absolute Difference
Merge Two Sorted Arrays Counting Sort Triplet Sum in Array
Merge Subarrays Cycle Sort Kth smallest element
Sorting Count inversions in Array Bucket Sort Number of pairs
Merge Sort Analysis Radix Sort Merge Without Extra Space
Quick Sort Introduction Overview of sorting algorithm Merge three sorted arrays
Partition a Given Array Closer to sort
Lomuto Partition Minimum Platforms
Hoare's Partition
Quick Sort using Lomuto Partition
Quick Sort using Hoare's Partition
Analysis of Quick Sort
Space Analysis of Quick Sort
Heap Sort
Introduction to Hashing Count Non-Repeated Elements Intersection of two arrays Intersection of two arrays
Hashing Application Print Non-Repeated Elements Union of two unsorted arrays Union of two arrays
Direct Address Table Non Repeating Character Pair with given sum in unsorted array Check if two arrays are equal or not
Hashing Functions Hashing for pair - 1 Subarray with 0 sum in Python Numbers containing 1, 2 and 3
Collision Handling Hashing for pair - 2 Check for Palindrome Permutation Subarray with 0 sum
Chaining Winner of an election Subarray with given sum Subarray range with given sum
Implementation of Chaining in Python Separate chaining in Hashing Longest Subarray with equal number of 0s and 1s Positive Negative Pair
Hashing Open Addressing Linear Probing in Hashing Longest common span with same sum in binary array Zero Sum Subarrays
Double Hashing Quadratic Probing in Hashing Longest Consecutive Subsequence Subarrays with equal 1s and 0s
Implementation of Open Addressing in Python First Repeating Element Longest Subarray with given sum Sort an array according to the other
Chaining vs Open Addressing More than n/k Occurences (O(nk) solution) Sorting Elements of an Array by Frequency
Set in Python
Dictionary in Python
Count Distinct Elements in a List
Frequencies of array elements

Strings in Python Length of String Overview of Pattern Searching Naive Pattern Search
Escape Sequences and Raw Strings Vowels in String Pattern Searching in Python Pattern Search
Formatted String in Python Count Distinct Vowels in String Naive Pattern Searching Binary String
String Comparison in Python Count Words in String Improved Naive Pattern Searching for Distinct Implement strstr
String Operations Part (1) Lowercase to Upercase Rabin Karp Algorithm Check if string is rotated by two places
String Operations Part (2) Uppercase to Lowercase KMP Algorithm (Part 1 : Constructing LPS Array) Check if strings are rotations of each other or not
Reverse A String in Python String Validation KMP Algorithm (Part 2 : Complete Algorithm) Isomorphic Strings
String
Check if string is rotated Panagram Checking Anagram Search Check if a string is Isogram or not
Check For Palindrome In Python Missing Characters in Panagram Lexicographic rank of a String Keypad typing
Check if a String is Subsequence of Other Reverse a String Longest Substring With Distinct Characters Repeating Character - First Appearance Leftmost
Check for Anagram in Python Anagram Non Repeating Character
Leftmost Repeating Character Maximum Occuring Character
Leftmost Non-Repeating Element Remove common characters and concatenate
Reverse words in a string Reverse words in a given string
Sum of numbers in string
Minimum indexed character
Smallest window in a string containing all the characters of another string
Nth number made of prime digits

Video - Problems with Array Data Structure Display Linked List Reverse a linked list in groups of size k Merge two sorted linked list
Linked List Introduction in Python Sum The Nodes of Linked List Detect loop using floyd's cycle detection algorithm Swap Kth nodes from end
Simple Linked List Implementation in Python Count nodes of linked list Detect and remove loop in linked list Remove loop in linked list
Applications of Linked List Maximum And Minimum In Linked List Intersection Point of two linked list Merge sort for linlked list
Traversing a Linked List in Python Search In Linked List Segregate even odd nodes of linked list Merge sort on doubly linked list
Search in Linked List Linked List Insertion Pairwise swap nodes of linked list Merge K sorted linked list
Insert At The Bigenning of Linked list in Python Insert in Middle of Linked List Clone a linked list using a random pointer Intersection point in Y shaped linked list
Insert at The End Of Linked List Linked List Insertion At Position LRU Cache Design Clone a linked list with nest and random pointer
Insert at Given Position in Singly Linked list Insert In Sorted Linked List Merge two sorted linked lists Add two numbers represented by linked list
Linked List Delete First Node Of Linked List in Python Delete Tail of Linked List Palindrome Linked List LRU Cache
Delete Last Node of Linked List Delete Head of Linked List
Delete a node with pointer given to it Linked List Delete at Position
Sorted Insert Linked List in Python Is Linked List Sorted
Middle of Linked List Join Two Linked Lists
Nth Node From end of Linked List Remove duplicate element from sorted Linked List
Remove duplicates from a sorted Singly Linked List Identical Linked Lists
Reverse a Linked List In Python Nth node from end of linked list
Recursive Reverse A Linked List (Part 1) Reverse a linked list
Recursive Reverse A Linked List (Part 2)

Circular Linked List in Python Display Circular Linked List


Circular Linked List (Advantages & Disadvantages) Length of Circular Linked List
Circular Linked List traversal Check If Circular Linked List
Insert at the Beginning of Circular Linked List Circular Linked List Head Insert
Circular Linked List Insert at The End of A Circular Linked List Circular Linked List Tail Insert
Delete Head of circular Linked List Circular Linked List Insertion At Position
Delete Kth Node of Circular Linked List Delete Tail of Circular Linked List
Delete Head of Circular Linked List
Circular Linked List Delete at Position

Doubly Linked List in Python Display Doubly Linked List


Singly Vs Doubly Linked List (Advantages & Disadvantages) Doubly Linked List Head Insert
Insert at the Beginning of DLL in Python Doubly Linked List Tail Insert
Insert at the End of DLL in Python Doubly linked list Insertion at given position
Delete Head of A Doubly Linked List Insert in Sorted way in a Sorted DLL
Delete Last Node of DLL in Python Delete Tail of Doubly Linked List
Doubly Linked List Reverse A Doubly Linked Llist in Python Delete Head of Doubly Linked List
Delete node in Doubly Linked List
Reverse a Doubly Linked List
Display Circular Doubly Linked List
Is The Doubly Linked List Circular
Compare Circular Doubly Linked Lists
Find Middle of Circular Doubly Linked List

Stack Data Structure Implement Stack Using Array Overview of Pattern Searching Naive Pattern Search
Stack in Python Implement Stack using Linked List Pattern Searching in Python Pattern Search
Linked List Implementation of Stack in Python Operations on Stack Naive Pattern Searching Binary String
Stack Stack Applications Removing consecutive duplicates Improved Naive Pattern Searching for Distinct Implement strstr
Check for Balanced Parenthesis in Python Removing consecutive duplicates - 2 Rabin Karp Algorithm Check if string is rotated by two places
Insert In Stack KMP Algorithm (Part 1 : Constructing LPS Array) Check if strings are rotations of each other or not
Parenthesis Checker KMP Algorithm (Part 2 : Complete Algorithm) Isomorphic Strings
Anagram Search Check if a string is Isogram or not
Lexicographic rank of a String Keypad typing
Longest Substring With Distinct Characters Repeating Character - First Appearance Leftmost
Non Repeating Character
Maximum Occuring Character
Remove common characters and concatenate
Reverse words in a given string
Sum of numbers in string
Minimum indexed character
Smallest window in a string containing all the characters of another string
Nth number made of prime digits

(Queue and Deque)


Queue in Python Implement Queue using array Queue Implementation using Circular List Queue Reversal
Queue Data Structure Operations on Queue Implementing stack using queue Queue using two Stacks
Queue Application of Queue Data structure Implement Queue using Linked List Reversing a Queue Stack using two queues
Implementation of Queue using Array Generate numbers with given digits Generate Binary Numbers
Linked List Implementation of Queue in Python Design a data structure with min/max operations Reverse First K elements of Queue
Maximums of all subarrays of size k Circular tour
First Circular Tour Rotate Deque By K
Deque Introduction Deque Implementations Maximum of all subarrays of size k
Deque Applications Implement Dequeue Using Linked List
Deque Deque in Python Insertion in deque
List Implementation of Deque in Python Dequeue Traversal
Linked List Implementation of Deque Deque deletion
Tree Data Structure Preorder Traversal Level Order Traversal by Line - Part 1 Children Sum Parent
Application of Tree Inorder Traversal Level Order Traversal by Line - Part 2 Maximum Width of Tree
Binary Tree in Python Postorder Traversal Check for Balanced Binary Tree Left View of Binary Tree
Tree Traversal Level order traversal Maximum Width of Binary Tree Right View of Binary Tree
Inorder Traversal in Python Check for Balanced Tree Convert Binary Tree to Doubly Linked List Lowest Common Ancestor in a Binary Tree
Preorder Traversal in Python Children Sum Parent Construct Binary Tree from Inorder and Preorder Diameter of a Binary Tree
Postorder Traversal in Python Height of Binary Tree Tree Traversal in Spiral Form Vertical Width of a Binary Tree
Tree Height of Binary Tree Determine if Two Trees are Identical Diameter of a Binary Tree Mirror Tree
Print Node at K distance LCA of Binary Tree (Part 1) Check if subtree
Level Order Traversal LCA of Binary Tree (Part 2) Make Binary Tree From Linked List
Size of Binary Tree in Python Burn a Binary Tree from a Leaf Binary Tree to DLL
Maximum in Binary Tree Count nodes in a Complete Binary Tree Binary Tree to CDLL
Iterative Inorder Traversal Serialize and Deserialize a Binary Tree Connect Nodes at Same Level
Iterative Preorder Traversal Construct Binary Tree from Parent Array
Iterative Preorder Traversal (Space Optimized) Tree from Postorder and Inorder
Foldable Binary Tree
Maximum path sum from any node
Maximum difference between node and its ancestor
Count Number of SubTrees having given Sum
Serialize and Deserialize a Binary Tree
Node at distance
ZigZag Tree Traversal
Maximum sum of Non-adjacent nodes

Binary Search Tree(Background) Insert a node in a BST Ceiling on the left side in an array Find Common Nodes in two BSTs
Binary Search Tree(Introduction) Search a node in BST Find Kth Smallest in BST Lowest Common Ancestor in a BST
Search in BST in Python Preorder in BST Check for BST Print BST elements in given range
BST insert in Python Inorder in BST Fix BST with Two Nodes Swapped Pair Sum in BST
BST Delete in Python Postorder in BST Pair Sum with Given BST Smaller on Right
Floor in BST (Problem and Solution Idea) Levelorder in BST Vertical Sum in a Binary Tree Vertical Traversal of Binary Tree
Binary SearchTree
BST Floor in Python Delete a node from BST Vertical Traversal of binary tree Top View of Binary Tree
Ceiling in BST in Python Minimum element in BST Top View of Binary Tree Bottom View of Binary Tree
Self Balancing BST Floor in BST bottom view of binary tree Check for BST
AVL Tree Ceil in BST Find the Closest Element in BST
Red Black Tree Convert Level Order Traversal to BST
Applications of BST Count BST nodes that lie in a given range
Preorder to Postorder
Merge two BST 's
Fixing Two nodes of a BST

Binary Heap Introduction Binary Heap Operations Sort K Sorted Array Kth largest element
Heap Python Implementation (Introduction) Heap Sort Purchase Maximum Items Kth smallest element
Heap Binary Heap Insert K Largest Elements K largest elements
Binary Heap (Extract min and Heapify) K Closest Elements Kth largest element in a stream
Decrease Key and Delete Operations Merge K Sorted Arrays K Most occurring elements
Build Heap Median of a Stream Minimum Cost of ropes
Heap Sort Nearly sorted
Heapq in Python Merge k Sorted Arrays
Rearrange characters
Find median in a stream

Introduction to Graph Print adjacency list


Graph Representation (Adjacency Matrix) BFS of graph
Graph Representation (Adjacency List) DFS of Graph
Graph Adjacency List Representation in Python Find the number of islands
Adjacency Matrix and List Comparison Detect cycle in an undirected graph
Breadth First Search in Python Detect cycle in a directed graph
BFS for Dsiconnected Graph Find whether path exist
Connected Components in an Undirected Graph using BFS Topological sort
Applications of BFS Level of Nodes
Depth First Search Possible paths between 2 vertices
DFS For Disconnected Graph X Total Shapes
Connected Components in an Undirected Graph using DFS Distance of nearest cell having 1
Applications of DFS Mother Vertex
Shortest Path in an Unweighted Graph Unit Area of largest region of 1's
Detect Cycle in Undirected Graph Rotten Oranges
Graph Detect Cycle in a Directed Graph (Part 1) Minimum Swaps to Sort
Topological Sorting (Kahn's BFS Based Algortihm) Steps by Knight
Detect Cycle in a Directed Graph (Part 2) Implementing Dijkstra Algorithm
Topological Sorting (DFS Based Algorithm) Minimum Spanning Tree
Shortest Path in DAG Strongly Connected Components (Kosaraju's Algo)
Prim's Algorithm/Minimum Spanning Tree Minimum Cost Path
Implementation of Prim's Algorithm Bridge edge in a graph
Dijkstra's Shortest Path Algorithm Strongly connected component (Tarjans's Algo)
Implementation of Dijkstra's Algorithm Articulation Point - I
Kosaraju's Algorithm Part 1 Articulation Point - II
Kosaraju's Algorithm Part 2
Bellman Ford Shortest Path Algorithm
Articulation Point
Bridges in Graph
Tarjans Algorithm
Kruskal's Algorithm

Introduction to Greedy Algorithms


Activity Selection Problem Activity Selection
Activity selection Huffman Decoding
Fractional Knapsack N meetings in one room
Greedy Fractional Knapsack in Python Fractional Knapsack
Job Sequencing Problem Largest number with given sum
Huffman Coding (introduction) Job Sequencing Problem
Huffman Algorithms
Python Implementation of Huffman coding

Concept of backtracking Largest number in K swaps


Rat In a Maze Rat Maze With Multiple Jumps
N Queen Problem Black and White
Backtracking Sudoku Problem Combination Sum
Unique Subsets
M-Coloring Problem
Solve the Sudoku

Introduction to DP Fibonacci Numbers - Bottom Up DP


Dynamic Programming Memoization Fibonacci Numbers - Top Down DP
Dynamic Programming Tabulation Print first n Fibonacci Numbers
Longest Common Subsequence (Part 1) Nth catalan number
Longest Common Subsequence (Part 2) Coin Change - Minimum number of coins
Variation of LCS Coin Change - Number of ways
Coin Change Count Combinations Ways to write n as sum
Edit Distance Problem Count ways to reach the n'th stair

Dynamic Programming
Edit Distance Problem DP solution Count ways to N'th Stair(Order does not matter)
Longest Increasing Sub sequence Problem Count number of hops
Longest Increasing Subsequence O(nlogn) Reach a given score
Variation of LIS (Part 1) Minimum number of jumps
Variations of LIS (Part 2) nCr
Maximum Cuts Kadane's Algorithm - I
Minimum coins to make a value Kadane's Algorithm - II
Dynamic Programming
Minimum Jumps to reach the end Unique BST's
0-1 knapsack problem Sum of all substrings of a number
0-1 knapsack problem DP Solution Max sum subarray by removing at most one element
Optimal Strategy for a Game Longest Increasing Subsequence
Egg Dropping Puzzle - Part 1 Longest Common Subsequence
Egg Dropping Puzzle - Part 2 Shortest Common Supersequence
Count BSTs with n keys Number of Unique Paths
Maximum sum with no two consecutive Maximize The Cut Segments
Subset sum problem Equal Sum Partition
Subset Sum Problem (DP Solution) 0 - 1 Knapsack Problem
Matrix Chain Multiplication Optimal Strategy For A Game
Matrix Chain Multiplication (DP Solution) Egg Dropping Puzzle
Palindrome Partitioning Stickler Thief
Allocate Minimum Pages (Naive Method)
Allocate Minimum Pages (DP Solution)

Trie Data Structure (Introduction) Search Query for Strings


Trie (Representation, Search and Insert) Renaming Cities
Trie Delete Camel Case
Trie
Count Distinct Rows in a Binary Matrix Contiguous Elements XOR
Most frequent word in an array of strings

Segment Tree (Introduction) Range Min Max Queries


Constructing Segment Tree Range Longest Correct Bracket Subsequence Queries
Range Query on Segment Tree Range GCD Queries
Update Query on Segment Tree Largest Sum Contiguous Subarray in Range
Binary Indexed Tree (Intoductiion) Range LCM Queries
Segment and Binary Indexed Trees Binary Indexed Tree (An Example Problem) Range Sum Queries
Binary Indexed Tree (Prefix Sum)
Binary Indexed Tree (Prefix Sum Implemention)
Binary Indexed Tree (Update Operation)

Disjoint Set Introduction Union-Find


Find and Union Operations on Disjoint Sets Number of Connected Components
Union by Rank Detect Cycle using DSU
Disjoint Set Path Compression Minimum Spanning Tree using Kruskal
Kruskal's Algorithm

You might also like