This repository contains all the code and PPT's for future reference.
- Introduction to Data Structures
- Types of Data Structures
- Complexity Analysis
- 1D Arrays
- Insertion , deletion and update
- Find largest and second largest element in an array
- Array Rotation
- 2D Matrix
- Introduction
- Memory allocation
- Dynamic arrays
- Print boundary elements
- Wave and spiral print
- Transpose of a matrix
- Rotate matrix by 90 degree anticlockwise
- Search algorithms
- Linear Search
- Binary Search
- Sorting Algorithms
- Bubble Sort
- Selection sort
- Insertion Sort
- Kadane's Algorithm
- Strings
- Introduction
- Various inbuilt functions
- ASCII values
- Questions solved:
- Print frequencies of characters in sorted order in a string of lower case alphabets.
- Check Palindrome ?
- Check if a string is subsequence of other ?
- Check for anagram ?
- Toggle string
- Vectors in C++
- Recursion
- Factorial of a number
- Fibonacci series
- Calculate pow(a,n) in log(n) time
- Generate all subsets
- Subset sum problem
- Print all subsets with given sum
- Tower of Hanoi
- Merge Sort
- Quick Sort
- Inversion Count
- Number Theory
- Count digits in an Integer
- Check if given number is palindrome
- HCF and LCM
- Check if n is prime or not?
- Find all prime factors of a number
- Find no of trailing zeros in factorial of a number
- Sieve of Eratosthenes
- Bit Manipulation
- Basics
- Check kth bit
- Count no of set bits
- Unique number
- Unique number II
- Unique Number III
- Singly Linked List
- Insertion at Head
- Insertion at Tail
- Insertion in Middle
- Deletion at Head
- Deletion at Tail
- Deletion in Middle
- Length of Linked List
- Circular Linked list
- Insertion at Head
- Insertion at Tail
- Insertion in Middle
- Deletion at Head
- Deletion at Tail
- Deletion in Middle
- Reverse a Linked List
- Doubly Linked List
- Insertion at Head
- Insertion at Tail
- Insertion in Middle
- Deletion at Head
- Deletion at Tail
- Deletion in Middle
- Intersection of 2 Linked List
- Cycle detection and Removal (Floyd's Algorithm)
- Stacks and Queues implementation using Array
- Duplicate Brackets
- Balanced brackets
- Next greater element
- Print binary numbers from 1 to n.
- Infix to postfix
- Infix to prefix
Hashing
- Internal Implementation using Hash functions
- Applications of Hashing
- Direct Address Table
- Collision Handling
- Chaining
- Open Addressing -> Linear Probing , Quadratic Probing and Double Hashing.
- Comparision of Collision teachniques
- unordered_map
- unordered_set
- Introduction to Trees
- Binary Trees and some important terminology
- Types of Binary Trees
- Tree Traversals
- DFS - Preorder , Postorder , Inorder
- BFS/ Level order
- Height of Binary Tree
- Check if a node is present in a tree?
- Find minimum and maximum value in a Binary Tree.
- Balanced Binary Tree
- Flatten a Binary Tree to Linked list
- Binary Search Tree Intoduction
- Validate Binary Search Tree
- Introduction to Graph Data Structure
- Types of Graphs
- Graph Representation
- Adjacency List
- Adjacency Matrix
- BFS
- DFS
- Is there a path between given source and destination ?
- Dijkstra's Algorithm
- Minimum Spanning Tree intro
- Prim's Algorithm
- Introduction to Dynamic Programming
- Fibonacci Series
- Climbing Stairs
- Minimum Path Sum
- Maximum sum with no consecutive
- Longest Common Subsequence
- 01 Knapsack
- Unbounded Knapsack - Rod Cutting Problem
- Longest Palindrome Subsequence