# Bitmask DSA Problems

> 48 Bitmask coding problems for placements and interviews, sorted easiest first, with hints and company tags. Free practice on InternHack.

Canonical: https://www.internhack.in/learn/dsa/bitmask
Last updated: 2026-11-28

48 bitmask problems for coding interviews and campus placements, with hints and company tags. Below are all 48: 0 easy, 17 medium and 31 hard. Practise them free on InternHack and track what you have solved.

## Bitmask problems, easiest first

1. [Android Unlock Patterns](https://www.internhack.in/learn/dsa/problem/android-unlock-patterns) (Medium)
2. [Beautiful Arrangement](https://www.internhack.in/learn/dsa/problem/beautiful-arrangement) (Medium)
3. [Campus Bikes II](https://www.internhack.in/learn/dsa/problem/campus-bikes-ii) (Medium)
4. [Can I Win](https://www.internhack.in/learn/dsa/problem/can-i-win) (Medium)
5. [Count the Number of Square-Free Subsets](https://www.internhack.in/learn/dsa/problem/count-the-number-of-square-free-subsets) (Medium)
6. [Fair Distribution of Cookies](https://www.internhack.in/learn/dsa/problem/fair-distribution-of-cookies) (Medium)
7. [Matchsticks to Square](https://www.internhack.in/learn/dsa/problem/matchsticks-to-square) (Medium)
8. [Maximum Compatibility Score Sum](https://www.internhack.in/learn/dsa/problem/maximum-compatibility-score-sum) (Medium)
9. [Maximum Product of the Length of Two Palindromic Subsequences](https://www.internhack.in/learn/dsa/problem/maximum-product-of-the-length-of-two-palindromic-subsequences) (Medium)
10. [Minimum Moves to Spread Stones Over Grid](https://www.internhack.in/learn/dsa/problem/minimum-moves-to-spread-stones-over-grid) (Medium)
11. [Minimum Number of Lines to Cover Points](https://www.internhack.in/learn/dsa/problem/minimum-number-of-lines-to-cover-points) (Medium)
12. [Minimum Number of Work Sessions to Finish the Tasks](https://www.internhack.in/learn/dsa/problem/minimum-number-of-work-sessions-to-finish-the-tasks) (Medium)
13. [Minimum Time to Break Locks I](https://www.internhack.in/learn/dsa/problem/minimum-time-to-break-locks-i) (Medium)
14. [Number of Self-Divisible Permutations](https://www.internhack.in/learn/dsa/problem/number-of-self-divisible-permutations) (Medium)
15. [Number of Ways to Build Sturdy Brick Wall](https://www.internhack.in/learn/dsa/problem/number-of-ways-to-build-sturdy-brick-wall) (Medium)
16. [Partition to K Equal Sum Subsets](https://www.internhack.in/learn/dsa/problem/partition-to-k-equal-sum-subsets) (Medium)
17. [Shopping Offers](https://www.internhack.in/learn/dsa/problem/shopping-offers) (Medium)
18. [Closest Subsequence Sum](https://www.internhack.in/learn/dsa/problem/closest-subsequence-sum) (Hard)
19. [Concatenated Divisibility](https://www.internhack.in/learn/dsa/problem/concatenated-divisibility) (Hard)
20. [Count Paths That Can Form a Palindrome in a Tree](https://www.internhack.in/learn/dsa/problem/count-paths-that-can-form-a-palindrome-in-a-tree) (Hard)
21. [Distribute Repeating Integers](https://www.internhack.in/learn/dsa/problem/distribute-repeating-integers) (Hard)
22. [Find Minimum Time to Finish All Jobs](https://www.internhack.in/learn/dsa/problem/find-minimum-time-to-finish-all-jobs) (Hard)
23. [Find Sum of Array Product of Magical Sequences](https://www.internhack.in/learn/dsa/problem/find-sum-of-array-product-of-magical-sequences) (Hard)
24. [Find the Minimum Cost Array Permutation](https://www.internhack.in/learn/dsa/problem/find-the-minimum-cost-array-permutation) (Hard)
25. [Find the Shortest Superstring](https://www.internhack.in/learn/dsa/problem/find-the-shortest-superstring) (Hard)
26. [Maximize Grid Happiness](https://www.internhack.in/learn/dsa/problem/maximize-grid-happiness) (Hard)
27. [Maximize Score After N Operations](https://www.internhack.in/learn/dsa/problem/maximize-score-after-n-operations) (Hard)
28. [Maximize the Number of Partitions After Operations](https://www.internhack.in/learn/dsa/problem/maximize-the-number-of-partitions-after-operations) (Hard)
29. [Maximum AND Sum of Array](https://www.internhack.in/learn/dsa/problem/maximum-and-sum-of-array) (Hard)
30. [Maximum Good Subtree Score](https://www.internhack.in/learn/dsa/problem/maximum-good-subtree-score) (Hard)
31. [Maximum Number of Groups Getting Fresh Donuts](https://www.internhack.in/learn/dsa/problem/maximum-number-of-groups-getting-fresh-donuts) (Hard)
32. [Maximum Number of Moves to Kill All Pawns](https://www.internhack.in/learn/dsa/problem/maximum-number-of-moves-to-kill-all-pawns) (Hard)
33. [Maximum Score Words Formed by Letters](https://www.internhack.in/learn/dsa/problem/maximum-score-words-formed-by-letters) (Hard)
34. [Maximum Students Taking Exam](https://www.internhack.in/learn/dsa/problem/maximum-students-taking-exam) (Hard)
35. [Minimum Cost to Connect Two Groups of Points](https://www.internhack.in/learn/dsa/problem/minimum-cost-to-connect-two-groups-of-points) (Hard)
36. [Minimum Incompatibility](https://www.internhack.in/learn/dsa/problem/minimum-incompatibility) (Hard)
37. [Minimum Time to Kill All Monsters](https://www.internhack.in/learn/dsa/problem/minimum-time-to-kill-all-monsters) (Hard)
38. [Minimum XOR Sum of Two Arrays](https://www.internhack.in/learn/dsa/problem/minimum-xor-sum-of-two-arrays) (Hard)
39. [Number of Squareful Arrays](https://www.internhack.in/learn/dsa/problem/number-of-squareful-arrays) (Hard)
40. [Number of Ways to Wear Different Hats to Each Other](https://www.internhack.in/learn/dsa/problem/number-of-ways-to-wear-different-hats-to-each-other) (Hard)
41. [Optimal Account Balancing](https://www.internhack.in/learn/dsa/problem/optimal-account-balancing) (Hard)
42. [Parallel Courses II](https://www.internhack.in/learn/dsa/problem/parallel-courses-ii) (Hard)
43. [Partition Array Into Two Arrays to Minimize Sum Difference](https://www.internhack.in/learn/dsa/problem/partition-array-into-two-arrays-to-minimize-sum-difference) (Hard)
44. [Shortest Path Visiting All Nodes](https://www.internhack.in/learn/dsa/problem/shortest-path-visiting-all-nodes) (Hard)
45. [Smallest Sufficient Team](https://www.internhack.in/learn/dsa/problem/smallest-sufficient-team) (Hard)
46. [Split Array With Same Average](https://www.internhack.in/learn/dsa/problem/split-array-with-same-average) (Hard)
47. [Stickers to Spell Word](https://www.internhack.in/learn/dsa/problem/stickers-to-spell-word) (Hard)
48. [The Number of Good Subsets](https://www.internhack.in/learn/dsa/problem/the-number-of-good-subsets) (Hard)

## Companies that ask bitmask problems

- [Google](https://www.internhack.in/learn/dsa/companies/google): 31 of these problems
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon): 15 of these problems
- [Meta](https://www.internhack.in/learn/dsa/companies/meta): 12 of these problems
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft): 10 of these problems
- [Uber](https://www.internhack.in/learn/dsa/companies/uber): 4 of these problems
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys): 4 of these problems
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce): 4 of these problems
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok): 4 of these problems
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg): 3 of these problems
- [Medianet](https://www.internhack.in/learn/dsa/companies/medianet): 3 of these problems
- [Sprinklr](https://www.internhack.in/learn/dsa/companies/sprinklr): 2 of these problems
- [Pinterest](https://www.internhack.in/learn/dsa/companies/pinterest): 2 of these problems

## Before your interview

Most resumes are filtered by software before a recruiter reads them. [Check your resume ATS score free](https://www.internhack.in/ats-score/try), no signup needed.

## Other DSA topics

- [Array](https://www.internhack.in/learn/dsa/array) (1869)
- [String](https://www.internhack.in/learn/dsa/string) (775)
- [Hash Table](https://www.internhack.in/learn/dsa/hash-table) (708)
- [Math](https://www.internhack.in/learn/dsa/math) (564)
- [Dynamic Programming](https://www.internhack.in/learn/dsa/dynamic-programming) (557)
- [Sorting](https://www.internhack.in/learn/dsa/sorting) (464)
- [Greedy](https://www.internhack.in/learn/dsa/greedy) (407)
- [Depth-First Search](https://www.internhack.in/learn/dsa/depth-first-search) (314)
- [Binary Search](https://www.internhack.in/learn/dsa/binary-search) (298)
- [Matrix](https://www.internhack.in/learn/dsa/matrix) (246)
- [Breadth-First Search](https://www.internhack.in/learn/dsa/breadth-first-search) (245)
- [Bit Manipulation](https://www.internhack.in/learn/dsa/bit-manipulation) (238)
- [Tree](https://www.internhack.in/learn/dsa/tree) (235)
- [Two Pointers](https://www.internhack.in/learn/dsa/two-pointers) (217)
- [Prefix Sum](https://www.internhack.in/learn/dsa/prefix-sum) (204)
- [Database](https://www.internhack.in/learn/dsa/database) (197)
- [Heap (Priority Queue)](https://www.internhack.in/learn/dsa/heap-priority-queue) (196)
- [Simulation](https://www.internhack.in/learn/dsa/simulation) (177)
- [Counting](https://www.internhack.in/learn/dsa/counting) (174)
- [Binary Tree](https://www.internhack.in/learn/dsa/binary-tree) (169)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA](https://www.internhack.in/learn/dsa)
