Skip to content

mayankdutta/category-wise-problems

Repository files navigation

🏅 Category Wise Problems 🎯

Approx Questions Count 300

  • Contains category wise organized problems(data structures, competitive) of popular platforms.
  • not only solution but also
    • Approaches
    • Corner Cases
    • Special Notes if any
    • Similar Questions if Encountered.

Forks Stars


OJ


OJ

  1. JMI college placement
  2. adhoc implementation
  3. Greedy
  4. Dynamic Programming
    1. Fibonacci type
    2. knapsack type
    3. Unbounded Knapsack / coin change
    4. Grid path type
    5. LIS type
    6. Prefix Sums / 1D Range sum type / Cumulative sums
  5. Graphs
    1. General Graph implementation
    2. Topological sorting
    3. Shortest Path
    4. flood fill
    5. DFS
    6. BFS
    7. 01 BFS
    8. Multi source shortest path
    9. MST
    10. Tree + dp
  6. Number Theory
  7. Searching and sorting
    1. implementation type
    2. sorting and observation type
    3. Binary Search type
    4. Sliding Window
    5. Heap type
    6. Intervals type
    7. Divide and Conquer
  8. Data structure
    1. Stack
    2. DSU
    3. Linked List
    4. Trees
    5. Binary Search Trees
    6. Trie/Prefix Tree
  9. Bitset
  10. Cracking the interview Questions
  11. Notes

Category Wise

JMI

  1. company data 2020
  2. company data 2021
  3. Sapient
  4. Delhivery
  5. Infoedge
  6. JTG_
  7. Innovacer
  8. Optum
  9. Accenture
  10. Wiley Mthree
  11. Mobikwik
  12. Samsung

Adhoc implementation

  1. Caesar Cipher
  2. Polycarp and String Transformation
  3. Vitamins
  4. Divide and print
  5. Gas station
  6. majority element
  7. majority element 2
  8. move zeros
  9. sort integers by power
  10. Kill the Monsters
  11. Partition String
  12. valid palindrome II
  13. Collision 2
  14. Moves on Binary Tree

Dynamic Programming.

Fibonacci

  1. Typical Stairs
  2. Boredom
  3. Constanze's Machine
  4. Basketball
  5. Domino and Tromino Tiling
  6. House robber
  7. Delete and earn
  8. Min Cost Climbing Stairs
  9. Arithmetic Slices
  10. Unique BST
  11. Number of people aware of secrets

Knapsack

  1. Two Sets 2
  2. Book Shop
  3. money sums
  4. dividing coins
  5. divisible group sums
  6. wedding shopping
  7. sum of different Primes
  8. hoof paper scissor
  9. maximum score from performing multiplication operations
  10. Divide the array in K segments such that the sum of minimums is maximized
  11. Best Time to Buy and Sell Stock IV
  12. Best Time to Buy and Sell Stock with Cooldown
  13. Best Time to Buy and Sell Stock with Transaction Fee
  14. Longest Palindromic Subsequence
  15. Last Stone Weight II

Unbounded Knapsack

  1. Coin change
  2. Coin change 2
  3. Knapsack with duplicate Items
  4. Removing Digits
  5. Minimizing coins
  6. Combination sum 4
  7. Dollars
  8. Fruit Feast
  9. Minimum Difficulty of a Job Schedule
  10. Number of Dice Rolls With Target Sum
  11. Decode Ways

Grid path

  1. edit distance
  2. grid paths
  3. LCS
  4. Maximal square
  5. Unique Paths
  6. Unique Paths 2
  7. Minimum Path sum
  8. Minimum Falling Path Sum
  9. Maximum Length of Repeated Subarray
  10. Champagne Tower

LIS

  1. what goes up
  2. Kth increasing
  3. Word Break

Cumulative sum

  1. Maximum Absolute Sum of Any Subarray
  2. Maximum Product Subarray
  3. Maximum Sum Circular Subarray
  4. Number of Smooth Descent Periods of a Stock
  5. Blackboard GCD
  6. Make Power of 2
  7. Subsequence Summing to 7
  8. Good Days to Rob the Bank
  9. And it's non-zero
  10. Contiguous array
  11. Tsundoku
  12. Intervals Between Identical Elements
  13. Maximum Sum of Two Non-Overlapping Subarrays
  14. Reducing dishes
  15. Best time to Buy and sell stocks
  16. Make Sum Divisible by P
  17. Arithmetic Slices
  18. Count of Subarrays having sum equal to its length
  19. Number of Subarrays having absolute sum greater than K
  20. Trapping Rain water, TODO
  21. Largest Sum Subarray of Size at least K

TODO

  1. AAB
  2. Cooking
  3. FG operation
  4. Shipping Center
  5. Strange Lunchbox

Graphs

Graph implementation

  1. Detonate the maximum bombs
  2. Replace the numbers
  3. Moo Cast

Topological Sorting

  1. Course schedule
  2. Game routes
  3. Longest flight route
  4. Parallel course 3
  5. Restricted permutation
  6. Longest Path
  7. Gardner and trees
  8. Minimum height tree
  9. Find All Possible Recipes from Given Supplies

Shortest path

  1. Flight discount
  2. Investigation
  3. Djikstra
  4. Network delay time
  5. Puzzle on Graph
  6. Swim in the rising water

Flood fill

  1. Making a Large Island
  2. Number of islands
  3. Number of Distinct Islands

DFS

  1. Round Trip
  2. Kings Path
  3. Neighbours
  4. Keys and Rooms

BFS

  1. Graph Girth
  2. Word Ladder
  3. Making a large island
  4. Swim in the Rising Water
  5. Multiply and Rotate
  6. Keys and Rooms

01 BFS

  1. Wizard in maze

MSSP

  1. 01 Matrix
  2. Shortest distance to a character

MST

  1. 3-types
  2. Minimum Cost to Connect Path

Tree Dp

  1. Number of Nodes in the Sub-Tree With the Same Label

Number theory

  1. Amusement park
  2. Divisor counts
  3. Pairs of Songs With Total Durations Divisible by 60
  4. Max GCD Pair
  5. Make it Equal
  6. Count Nice Pairs in an Array
  7. Robbery
  8. Max GCD 2
  9. Multiple length

Searching and sorting

greedy implementation

  1. Shortest distance to a character
  2. Construct Smallest Number From DI String
  3. DI String Match
  4. Shortest Subarray to be Removed to Make Array Sorted
  5. Best time to sell the stock

sorting and observation

  1. Linear approximation
  2. LR Insertion

Binary search

  1. Binary Search
  2. Binary search in sorted rotated array
  3. Apartments
  4. Subarray sums 2
  5. Binary search in sorted array
  6. Koko eating bananas
  7. swim in the rising water
  8. count the words after adding a letter

Sliding Window

  1. Contains Duplicate II
  2. maximum consecutive one's
  3. Minimum Operations to Reduce X to Zero
  4. Longest X
  5. Subarrays with k different Integers
  6. Number of Substrings Containing All Three Characters
  7. Binary Subarrays with sum
  8. Minimum Swaps to Group All 1's Together II
  9. Find All Anagrams in a String
  10. Permutation in String
  11. Total Appeal of A String
  12. Count Unique Characters of All Substrings of a Given String
  13. Sliding window Maximum
  14. Geekland colosseum
  15. Maximum sum of two non-overlapping subarrays of a given size
  16. Largest Sum Subarray of Size at least K
  17. Maximum Number of Robots Within Budget

Intervals type

  1. Non Overlapping Subintervals
  2. Merge intervals
  3. Car pooling
  4. Permutation in String
  5. My Calendar I

Heaps

  1. Top k frequent words
  2. Kth Largest Element in an Array
  3. Top K Frequent Elements
  4. Last Stone Weight
  5. K Closest Points to Origin
  6. Furthest Building You Can Reach
  7. Geekland colosseum
  8. Potions
  9. Minimum Number of Refueling Stops
  10. Find Median from Data Stream , todo

Divide Conquer

  1. Thanos sort
  2. Number of Pairs Satisfying Inequality

Data structure

Stack

  1. Longest valid paranthesis
  2. Asteroid Collision
  3. Sliding window Maximum
  4. 132 Pattern
  5. asteroid collission
  6. largest area histogram
  7. Next greater element
  8. Remove duplicate letters
  9. Remove K digits
  10. First negative integer in every window of size k

DSU

  1. Little Alawn's Puzzle
  2. Graph destruction
  3. Accounts Merge
  4. Neighbours
  5. Largest Component Size by Common Factor
  6. Making a large island
  7. Most Stones Removed with Same Row or Column
  8. smallest string with swaps

Linked List

  1. Add two numbers
  2. Delete node in linked list
  3. Intersection of two linked list
  4. Linked list cycle
  5. Middle of the linked list
  6. Reverse linked list
  7. Odd Even Linked List
  8. Palindrome linked list
  9. Merge two sorted arrays
  10. Sort List
  11. Merge k sorted list
  12. LR Insertion
  13. Copy List with Random Pointer
  14. LRU cache
  15. Delete the Middle Node of a Linked List

Trees

  1. Pre-order Traversal
  2. In-order Traversal
  3. Post-order Traversal
  4. Level order
  5. Left view
  6. Right view
  7. Top view
  8. Bottom view
  9. Depth of binary tree
  10. Balanced binary tree
  11. Same Tree
  12. diameter of the binary tree
  13. binary tree tilt
  14. Populating Next Right Pointers in Each Node
  15. Lowest common ancestor
  16. Maximum difference between node and ancestor
  17. vertical order traversal
  18. Binary Tree Zigzag Level Order Traversal
  19. Symmetric Tree
  20. Maximum Width of Binary Tree
  21. Count Complete Tree Nodes
  22. Create Binary Tree From Descriptions
  23. Duplicate Subtree
  24. Delete leaves with given value
  25. Binary Tree Pruning
  26. Distance b/w two nodes
  27. All distance at k in Binary tree
  28. Max Depth N ary tree
  29. Binary Tree to mirror tree
  30. Morris In order
  31. Morris Pre order
  32. Binary Tree to DLL

BST

  1. insert into binary search tree
  2. Validate Binary Search Tree
  3. Convert Sorted Array to Binary Search Tree
  4. Minimum Distance Between BST Nodes
  5. Delete node in BST
  6. Unique BST
  7. Serialize and Deserialize Binary Tree
  8. BST to greater sum tree
  9. Minimum absolute difference

Trie

  1. Implement Trie (Prefix Tree)
  2. Design Add and Search Words Data Structure

Bitset

  1. complement of base 10
  2. Hammering distance
  3. Number of valid words for each puzzle
  4. Total hammering distance
  5. and it's non-zero
  6. Make it equal
  7. count the words after adding a letter
  8. majority element
  9. Find XOR Sum of All Pairs Bitwise AND

Cracking Interview

  1. Is unique
  2. Check Permutation

💥How to Contribute?

Head over to Contributing Guidelines to know more!

Stargazers over time

Stargazers over time