Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2166. Design Bitset
Design a Bitset class supporting fix, unfix, flip, all, one, count, and toString on a fixed-size bit array. The key challenge is to implement flip and the queries efficiently (e.g., O(1) per op) by using a lazy inversion flag and tracked counts instead of flipping every bit.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.