Mastering Data Structures & Algorithms using C and C++
·10 mins
Table of Contents
If you know and love mathematics, dont waste yuor time, this course is your best bet.
Course Syllabus #
- Length: 56H
- Original: https://www.udemy.com/course/datastructurescncpp/
- Price: $12
- Author: Abdul Bari
- Samples he has on his channel
Before we Start #
- Instructor’s Note
- Introduction
Essential C and C++ Concepts #
- Arrays Basics
- Practice : Arrays Basics
- Structures
- Practice : Structures
- Pointers
- Practice : Pointers
- Reference in C++
- Practice : Reference
- Pointer to Structure
- Practice : Pointer to Structure
- Functions
- Practice : Functions
- Parameter Passing Methods
- Practice : Parameter Passing Methods
- Array as Parameter
- Practice : Array as Parameter
- Structure as Parameter
- Practice : Structure as Parameter
- Structures and Functions (Must Watch)
- Converting a C program to a C++ class (Must Watch)
- Practice : Monolithic Program
- Practice : Modular Program
- Practice : Structure and Functions
- Practice : Object-Oriented Program
- C++ Class and Constructor
- Practice : C++ Class
- Template classes
- Practice : Template Class
Required Setup for Programming #
- Online C and C++ compiler
- Setup CodeBlocks and Settings
- Setup Dev-C++ and Settings
- Debugging using Dev-C++
- Debugging using CodeBlocks
- Setup Visual Studio
- Debugging using Visual Studio
- Setup Xcode
Introduction #
- Introduction
- Stack vs Heap Memory
- Stack vs Heap. Continued…
- Physical vs Logical Data Structures
- ADT
- Time and Space Complexity
- Time and Space Complexity from Code
Recursion #
- How Recursion Works ( Tracing )
- Generalising Recursion
- How Recursion uses Stack
- Recurrence Relation - Time Complexity of Recursion
- Lets Code Recursion
- Static and Global Variables in Recursion
- Let’s Code Static and Global in Recursion
- Tail Recursion
- Head Recursion
- Tree Recursion
- Let’s Code Tree Recursion
- Indirect Recursion
- Let’s Code Indirect Recursion
- Nested Recursion
- Let’s Code Nested Recursion
- Sum of Natural Number using Recursion
- Let’s Code Sum of N using Recursion
- Factorial using Recursion
- Let’s Code Factorial using Recursion
- Power using Recursion
- Let’s Code Power Recursion
- Taylor Series using Recursion
- Let’s Code Taylor Series using Recursion
- Taylor Series using Horner’s Rule
- Let’s Code Taylor Series Horner’s Rule - Recursion
- Let’s Code Taylor Series Iterative
- Fibonacci Series using Recursion - Memoization
- Let’s Code Fibonacci
- nCr using Recursion
- Let’s Code nCr using Recursion
- Tower of Hanoi Problem
- Let’s Code Tower of Hanoi
- Quiz 1 Solutions
Arrays Representations #
- Introduction to Array
- Declarations of Array
- Demo - Array Declaration
- Static vs Dynamic Arrays
- Demo - Static vs Dynamic Array
- How to Increase Array Size
- Demo - Increasing Array Size
- 2D Arrays
- Demo - 2D Array
- Array Representation by Compiler
- Row Major Formula for 2D Arrays
- Column Major Formula for 2D Arrays
- Formulas for nD Arrays
- Formulas for 3D Arrays
- Solutions for Quiz 2
Array ADT #
- Array ADT
- Demo - Array ADT
- Inserting in an Array
- Let’s Code Insert
- Deleting from Array
- Let’s Code Delete
- Linear Search
- Improving Linear Search
- Let’s Code Linear Search
- Binary Search
- Binary Search Algorithm
- Let’s Code Binary Search
- Analysis of Binary Search
- Average Case Analysis of Binary Search
- Get( ) Set( ) Avg( ) Max( ) functions on Array
- Let’s Code Get() Set() Max() on Array
- Reverse and Shift an Array
- Lest’s Code Reversing an Array
- Check if Array is Sorted
- Let’s Code to check if Array is Sorted
- Merging Arrays
- Let’s Code to Merge Arrays
- Set operations on Array - Union, Intersection and Difference
- Let’s Code Set operations on Array
- Let’s Code a Menu Driver program for Arrays
- Let’s convert C program for Array to C++
- Let’s Put all together in C++ program for Array
- Student Challenge : Finding Single Missing Element in an Array
- Student Challenge : Finding Multiple Missing Elements in an Array
- Student Challenge : Finding Missing Element in an Array Method 2
- Student Challenge Finding Duplicates in a Sorted Array
- Student Challenge : Finding Duplicates in Sorted Array using Hashing
- Student Challenge : Finding Duplicates in a Unsorted Array
- Student Challenge : Finding a Pair of Elements with sum K
- Student Challenge : Finding a Pair of Elements with sum K in Sorted Array
- Student Challenge : Finding Max and Min in a single Scan
- Solutions for Quiz 3
Strings #
- Introduction to Strings
- Finding Length of a String
- Changing Case of a String
- Counting Words and Vowels in a String
- Validating a String
- Reversing a String
- Comparing Strings and Checking Palindrome
- Finding Duplicates in a String
- Finding Duplicates in a String using Bitwise Operations
- Checking if 2 Strings are Anagram (distinct letters)
- Permutation of String
Matrices #
- Section Introduction
- Diagonal Matrix
- Let’s Code Diagonal Matrix
- C++ class for Diagonal Matrix
- Let’s Code C++ class for Diagonal matrix
- Lower Triangular Matrix Row-Major Mapping
- Lower Triangular Matrix Column-Major Mapping
- Let’s Code Lower Triangular Matrix in C
- Let’s Code Lower Triangular Matrix in C++
- Upper Triangular Matrix Row-Major Mapping
- Upper Triangular Matrix Column-Major Mapping
- Symmetric Matrix
- Tri-Diagonal and Tri-Band Matrix
- Toeplitz Matrix
- Menu Driven Program for Matrices
- Menu Driven Program for Matrices using Functions
- How to Write C++ Classes for All Matrices
Sparse Matrix and Polynomial Representation #
- Sparse Matrix Representation
- Addition of Sparse Matrices
- Array Representation of Sparse Matrix
- Let’s Code to Create Sparse Matrix
- Program for Adding Sparse Matrix
- Let’s Code to Add Sparse Matrix
- Let’s Code Sparse Matrix using C++
- Let’s Code Sparse Matrix using C++ Continued…..
- Polynomial Representation
- Polynomial Evaluation
- Polynomial Addition
- Let’s Code Polynomial
Linked List #
- Why we need Dynamic Data Structure Linked List
- About Linked List
- More About Linked List
- Display Linked List
- Let’s Code Display for Linked List
- Recursive Display of Linked List
- Let’s Code Recursive Display for Linked List
- Counting Nodes in a Linked List
- Sum of All Elements in a Linked List
- Let’s Code Count and Sum
- Maximum Element in a Linked List
- Let’s Code Max for Linked List
- Searching in a Linked List
- Improve Searching in Linked List
- Let’s Code Searching in Linked List
- Inserting in a Linked List
- Let’s Code Insert for Linked List
- Creating a Linked List using Insert
- Creating a Linked List by Inserting at Last
- Inserting in a Sorted Linked List
- Let’s Code Insert in Sorted Linked List
- Deleting from Linked List
- Let’s Code Delete on Linked List
- Check if a Linked List is Sorted
- Let’s Code to check if Linked List is Sorted
- Remove Duplicates from Sorted Linked List
- Let’s Code to Remove Duplicates from Sorted Linked List
- Reversing a Linked List
- Reversing using Sliding Pointers
- Recursive Reverse for Linked List
- Let’s Code Reversing a Linked List
- Concatenating 2 Linked Lists
- Merging 2 Linked Lists
- Let’s Code to Concatenate and Merge Linked Lists
- Check for LOOP in Linked List
- Let’s Code to Check LOOP
- Let’s Code a C++ class for Linked List
- Circular Linked List
- Display Circular Linked List
- Let’s Code Circular Linked List
- Inserting in a Circular Linked List
- Let’s Code Insert for a Circular Linked List
- Deleting From Circular Linked List
- Let’s Code Delete for Circular Linked List
- Doubly Linked List
- Let’s Code Doubly Linked List
- Insert in a Doubly Linked List
- Let’s Code Insert for Doubly Linked List
- Deleting from Doubly Linked List
- Let’s Code Delete for Doubly Linked List
- Reverse a Doubly Linked List
- Let’s Code Reverse for Doubly Linked List
- Circular Doubly Linked List
- Comparison of Linked List
- Comparison of Array with Linked List
- Student Challenge : Finding Middle Element of a Linked List.
- Student Challenge : Finding Intersecting point of Two Linked List
Sparse Matrix and Polynomial using Linked List #
- Student Challenge : Sparse Matrix using Linked List
- Student Challenge: Polynomial Representation using Linked List
- Let’s Code Polynomial
Stack #
- Introduction to Stack
- Stack using Array
- Implementation os Stack using Array
- Let’s Code Stack using Array
- Stack using Linked List
- Stack Operations using Linked List
- Let’s Code Stack using Linked List
- Let’s Code C++ class for Stack using Linked List
- Parenthesis Matching
- Program for Parenthesis Matching
- Let’s Code Parenthesis Matching
- More on Parenthesis Matching
- Infix to Postfix Conversion
- Associativity and Unary Operators
- Infix to Postfix using Stack Method 1
- Infix to Postfix using Stack Method 2
- Program for Infix to Postfix Conversion
- Let’s Code Infix to Postfix Conversion
- Student Challenge: Infix to Postfix with Associativity and Parenthesis
- Evaluation of Postfix Expression
- Program for Evaluation of Postfix
- Let’s Code Evaluation of Postfix
Queues #
- Queue ADT
- Queue using Single Pointer
- Queue using Two Pointers
- Implementing Queue using Array
- Let’s Code Queue using Array
- Let’s Code Queue in C++
- Drawback of Queue using Array
- Circular Queue
- Let’s Code Circular Queue
- Queue using Linked List
- Let’s Code Queue using Linked List
- Double Ended Queue DEQUEUE
- Priority Queues
- Queue using 2 Stacks
Trees #
- Terminology
- Number of Binary Trees using N Nodes
- Height vs Nodes in Binary Tree
- Internal Nodes vs External Nodes in Binary Tree
- Strict Binary Tree
- Height vs Node of Strict Binary Tree
- Internal vs External Nodes of Strict Binary Trees
- n-ary Trees
- Analysis of n-Ary Trees
- Representation of Binary Tree
- Linked Representation of Binary Tree
- Full vs Complete Binary Tree
- Strict vs Complete Binary Tree
- Binary Tree Traversals
- Binary Tree Traversal Easy Method 1
- Binary Tree Traversal Easy Method 2
- Binary Tree Traversal Easy Method 3
- Creating Binary Tree
- Program to Create Binary Tree
- Let’s Code Creating Binary Tree
- Let’s Code Creating Binary Tree in C++
- Preorder Tree Traversal
- Inorder Tree Traversals Functions
- Iterative Preorder
- Iterative Inorder
- Let’s Code Iterative Traversals
- Level Order Traversal
- Let’s Code Level Order Traversal
- Can we Generate Tree from Traversals
- Generating Tree from Traversals
- Height and Count of Binary Tree
- Let’s Code Height and Count
- Student Challenge : Count Leaf Nodes of a Binary Tree
Binary Search Trees #
- BST intro
- Searching in a Binary Search Tree
- Inserting in a Binary Search Tree
- Recursive Insert in Binary Search Tree
- Creating a Binary Search Tree
- Let’s code Binary Search Tree
- Deleting from Binary Search Tree
- Let’s Code Recursive Insert and Delete on BST
- Generating BST from Preorder
- Program for Generating BST from Preorder
- Drawbacks of Binary Search Tree
AVL Trees #
- Introduction to AVL Trees
- Inserting in AVL with Rotations
- General form of AVL Rotations
- Let’s Code LL Rotation on AVL
- Let’s Code LR Rotation on AVL
- Generating AVL Tree
- Deletion from AVL Tree with Rotations
- Height Analysis of AVL Trees
Search Trees #
- 2-3 Trees
- 2-3-4 Trees
- Red-Black Trees Introduction
- Red-Black Tree creation
- Red-Black Trees vs 2-3-4 Trees
- Creating Red-Black Tree similar to Creating 2-3-4 Tree
- Red-Black Tree Deletion Cases
- Red-Black Tree Deletion Examples
- Red-Black Tree vs 2-3-4 Tree Deletion
Heap #
- Introduction to Heap
- Inserting in a Heap
- Program to Insert in a Heap
- Creating a Heap
- Deleting from Heap and Heap Sort
- Let’s Code Heap Sort
- Heapify - Faster Method for creating Heap
- Heap as Priority Queue
Sorting Techniques #
- Criteria used for Analysing Sorts
- Bubble Sort
- Let’s Code Bubble Sort
- Insertion Sort
- Insertion Sort Continued….
- Program for Insertion Sort
- Analysis of Insertion Sort
- Let’s Code Insertion Sort
- Comparing Bubble and Insertion Sort
- Selection Sort
- Program for Selection Sort
- Analysis of Selection Sort
- Let’s Code Selection Sort
- Idea behind Quick Sort
- Quick Sort
- Analysis of Quick Sort
- Analysis of Quick Sort Continued…..
- Let’s Code Quick Sort
- Merging
- Iterative Merge Sort
- Let’s Code Iterative Merge Sort
- Recursive Merge Sort
- Let’s Code Recursive Merge Sort
- Count Sort
- Let’s Code Count Sort
- Bin / Bucket Sort
- Radix Sort
- Shell Sort
- Let’s Code Shell Sort
Hashing Technique #
- Introduction to Hashing
- Chaining
- Let’s Code Chaining
- Linear Probing
- Let’s Code Linear Probing
- Quadratic Probing
- Double Hashing
- Hash Function Ideas
Graphs #
- Introduction to Graphs
- Representation of Undirected Graph
- Representation of Directed Graphs
- Breadth First Search
- Program for BFS
- Depth First Search
- Program for DFS
- Let’s Code BFS & DFS
- Spanning Trees
- Prim’s Minimum Cost Spanning Tree
- Prim’s Program
- Let’s Code Prim’s using
- Kruskal’s Minimum Cost Spanning Tree
- Disjoint Subsets
- Kruskal’s Program
- Let’s Code Kruskla’s Program
Asymptotic Notations #
- Asymptotic Notations Big Oh , Omega , Theta
- PDF for All Programs