Combinatorics DSA Problems

48 combinatorics problems for coding interviews and campus placements, with hints and company tags. Below are all 48: 3 easy, 16 medium and 29 hard. Practise them free on InternHack and track what you have solved.

Combinatorics problems, easiest first

  1. Check If Digits Are Equal in String After Operations I (Easy)
  2. Distribute Candies Among Children I (Easy)
  3. Sum of All Subset XOR Totals (Easy)
  4. Count Sorted Vowel Strings (Medium)
  5. Count the Number of Computer Unlocking Permutations (Medium)
  6. Count the Number of Good Subsequences (Medium)
  7. Count the Number of K-Free Subsets (Medium)
  8. Distribute Candies Among Children II (Medium)
  9. Find the Derangement of An Array (Medium)
  10. Find the N-th Value After K Seconds (Medium)
  11. Find Triangular Sum of an Array (Medium)
  12. Maximum and Minimum Sums of at Most Size K Subsequences (Medium)
  13. Number of Sets of K Non-Overlapping Line Segments (Medium)
  14. Number of Strings Which Can Be Rearranged to Contain Substring (Medium)
  15. Right Triangles (Medium)
  16. The Number of Beautiful Subsets (Medium)
  17. Ugly Number III (Medium)
  18. Unique Paths (Medium)
  19. Vowels of All Substrings (Medium)
  20. Check If Digits Are Equal in String After Operations II (Hard)
  21. Count All Valid Pickup and Delivery Options (Hard)
  22. Count Anagrams (Hard)
  23. Count K-Reducible Numbers Less Than N (Hard)
  24. Count K-Subsequences of a String With Maximum Beauty (Hard)
  25. Count Number of Balanced Permutations (Hard)
  26. Count the Number of Arrays with K Matching Adjacent Elements (Hard)
  27. Count the Number of Good Partitions (Hard)
  28. Count the Number of Ideal Arrays (Hard)
  29. Count the Number of Infection Sequences (Hard)
  30. Count Ways to Build Rooms in an Ant Colony (Hard)
  31. Count Ways to Make Array With Product (Hard)
  32. Distribute Candies Among Children III (Hard)
  33. Find Nth Smallest Integer With K One Bits (Hard)
  34. Find Number of Ways to Reach the K-th Stair (Hard)
  35. Find Sum of Array Product of Magical Sequences (Hard)
  36. Find the Count of Good Integers (Hard)
  37. Find the Count of Monotonic Pairs I (Hard)
  38. Find the Count of Monotonic Pairs II (Hard)
  39. Find the Number of Possible Ways for an Event (Hard)
  40. Kth Smallest Instructions (Hard)
  41. Manhattan Distances of All Arrangements of Pieces (Hard)
  42. Minimum Number of Operations to Make String Sorted (Hard)
  43. Number of Music Playlists (Hard)
  44. Number of Ways to Reach Destination in the Grid (Hard)
  45. Number of Ways to Rearrange Sticks With K Sticks Visible (Hard)
  46. Number of Ways to Reorder Array to Get Same BST (Hard)
  47. Poor Pigs (Hard)
  48. Sorted GCD Pair Queries (Hard)

Companies that ask combinatorics problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics