DSA/algorithms/CPlusPlus/README.md

5.9 KiB
Raw Blame History

C++

Arrays

  1. Counting Inversions
  2. Dutch Flag Algorithm
  3. Left Rotation
  4. Max Subarray Sum
  5. Shift Negatives
  6. BoyerMoore Voting Algorithm
  7. Reverse Array
  8. Sorted-Rotated Search Array
  9. Fractional Knapsack
  10. Quick Selection
  11. Remove Duplicates
  12. Leaders In The Array
  13. Elements appear thrice In The Array
  14. Maximum Difference
  15. Occurrence of one in sorted array
  16. Segregate 0s and 1s
  17. Search insert position

Dynamic-Programming

  1. Longest Common Subsequence
  2. Longest Common Substring
  3. 0/1-knapsack
  4. Matrix chain Multiplication
  5. Edit Distance

Graphs

  1. Bellman Ford Algorithm
  2. kruskal Algorithm
  3. Breadth First Search
  4. Topological sort

Multiplication

  1. Karatsuba

Linked Lists

  1. All possible insertions
  2. Singly linked lists
  3. doubley linked lists
  4. Circular linked lists
  5. Removing Elements of given value
  6. Reversing a linked lists
  7. Merging two sorted linked lists
  8. Reorder List
  9. Detecting cycle in a singly linked list
  10. Find Merge Point of two singly linked list
  11. Segregate Even Odd Nodes of linked list
  12. Remove Duplicate in Sorted linked list

Searching

  1. Linear Search
  2. Jump Search
  3. Binary Search
  4. Finding squareroot using Binary search
  5. KMP String Searching
  6. Ternary Search
  7. Interpolation Search
  8. Exponential Search

Stacks

  1. Balancing Parenthesis

  2. Reversing Stack

  3. Stack using Array

Sorting

  1. Bubble Sort
  2. Insertion Sort
  3. Quicksort
  4. Selection Sort
  5. 3 way Quick Sort
  6. Bucket Sort
  7. Comb Sort
  8. Counting Sort
  9. heap Sort
  10. Radix Sort
  11. Shell Sort
  12. Binary Insertion Sort
  13. Merge Sort
  14. Wave Sort
  15. Cycle Sort

Strings

  1. Rabin-Karp pattern search algo
  2. All subsequence of a string (Recursion)
  3. String reversal
  4. String tokanisation
  5. Anagram check
  6. Remove occurrences from string
  7. Delete alternate characters in a string
  8. Print first letter of every word

Trees

  1. Creating Binary Tree
  2. Counting and finding sum of all the nodes in BST
  3. Level Order Traversal
  4. Depth first Traversal
  5. Binary Search Tree
  6. In order morris traversal
  7. In order Predecessor and Successor
  8. Avl Tree
  9. Min Heap
  10. Finding the height of a given tree
  11. Finding the elements of a tree visible from top view
  12. Binary Tree Implementation

Maths

  1. Kaprekar Number
  2. Prime Number
  3. Prime Sieve
  4. Fibonacci Series
  5. Binomial Coefficient
  6. Armstrong Number
  7. Palindrome
  8. Reverse digit of a number
  9. Missing number
  10. Factorial of a number

Recursion

  1. Tower of Hanoi
  2. Factorial
  3. Permutation
  4. GCD/HCF of two numbers
  5. Sum of all elements of an array
  6. Decimal number to Binary conversion
  7. Sum of digits of a decimal integer