Skip to content

Latest commit

 

History

History
143 lines (130 loc) · 3.66 KB

README.md

File metadata and controls

143 lines (130 loc) · 3.66 KB

=========Must-Do-Coding-Questions===========

Array

1.Largest Sum Contiguous Subarray [Kadane’s Algorithm]
2.Missing Number
3.SubArray Given Sum
4.Sort an Array of 0,1,2
5.Equilibrium Point
6.Maximum sum increasing Subsequence
7.Leaders in the Array
8.Minimum Platforms
9.Maximum of all Subarrays of size k
10.Reverse Array in Groups of size k
11.Kth Smallest Element
12.Trapping Rain Water
13.Check for Pythagorean Triplet in Array
14.Chocolate Distribution Problem
15.Stock Buy and Sell
16.Element with left side smaller and right side greater
17.Convert Array into Zig Zag Fashion
18.Find the element that appears once in sorted array
19.Kth Largest Element in stream
20.Relative Sorting
21.Spirally traversing a Matrix
22.Sorting Elements of an Array by Frequency
23.Largest Number formed from an Array

String

1.Parenthesis Checker
2.Reverse Words in String
3.Print All Permutations of given string
4.Longest Palindromic Substring
5.Recursively remove All duplicates
6.Check if String is rotated by two Places
7.Convert Roman to Integer
8.Anagrams
9.Longest Common Substring
10.Remove Duplicates
11.Implement atoi
12.Implement strstr
13.Minimum Insertions to form Palindrome
14.Longest Common Prefix in an Array of strings [Using Binary Search]

Hashing

1.Largest subarray with 0 sum
2.Swapping Pairs make equal sum of two Arrays
3.Count distinct elements in every window
4.Array Pair Sum Divisibility Problem
5.Minimum indexed Character
6.Find first repeated character
7.Check if two Arrays are equal or not?
8.Uncommon Characters
9.Check if frequencies can be equal
10.First element to occur k times
11.Find all pairs with a given sum
12.Array Subset of another array
13.Smallest window in a string containing all the characters of another string

Graph Algorithms

1. Breadth First Search
2. Depth First Search
3. Count Number of Islands
4. Dijkstra [Shortest Path]
5. Find whether path exist
6. Shortest Path to Destination
7. Flood fill Algorithm
8. Minimum Cost Path

Bit Magic

1.First Set Bit
2.Righmost Different Bit in two Numbers
3.Check kth bit Set or Not
4.Toggle Bits in given Range
5.Set kth Bit
6.Check Power of 2
7.Bit Difference
8.Number is sparse or not
9.Swap all odd and even bits
10.Count Total Set Bits
11.Longest Consecutive 1's

Divide and Conquer

1. Binary Search iterative
2. Binary Search Recursive
3. Merge Sort
4. Quick Sort
5. K-th element of two sorted Arrays

Dynamic Programming

1. Fibbonaci Series
2. Binomial Coefficient
3. Longest Common Subsequence
4. Maximum size square sub-matrix with all 1's
5. 0-1 Knapsack
6. Minimum Number of Jumps
7. Edit Distance
8. Longest Increasing Subsequence
9. Coin Change
10. Maximum weighted Path in Matrix to reach Last Row
11. Subset Sum Problem
12. Cutted Segments
13. Box Stacking
14. Count Number of Ways
15. Number of Paths
16. Special Keyboard

Greedy Algorithms

1. Activity Selection
2. N meetings in one room
3. Minimum Number of Coins for Change
4. Maximize Toys
5. PageFaults in LRU
6. Largest Number Possible
7. Minimize the Sum of Product [Dot Product] 
8. Minimize Heights of Tower
9. Minimum Operations to Reach N
10. Shop in Candy Store
11. Maximum Length Chain
12. Minimum Spanning Tree
13. Geek Collects the Ball

Stack and Queue

1. First Non Repeating Character in Stream
2. Rotten Oranges
3. Next Larger Element
4. Stock Span Problem
5. Celebrity Problem
6. Number Following Pattern
7. Print Bracket Number in Expression

Searching

1. Linear Search

Sorting

1. Bubble Sort
2. Selection Sort
3. Insertion Sort
4. Counting Sort

Mathematical Algorithms

1. GCD & LCM
2. LCM of Array