Meet your coaches
Talk through the problem while you code. Signed-in reps become prep memory for the next session.
Number of 1 Bits
Binary search is the tool here, but the real test is whether your invariant stays crisp. It's a great warm-up that builds boundary precision without a ton of moving parts. The trap is boundary drift—one wrong low/high update can loop forever or skip the answer.
Learn this pattern
Bit Manipulation
Bit manipulation uses XOR, shifts, and masks to solve problems in O(1) space that would otherwise need hash maps. About 5 core tricks -- XOR for uniqueness, bit checks, Brian Kernighan's count -- cover 90% of interview bit problems.
Meet your coaches
Talk through the problem while you code. Signed-in reps become prep memory for the next session.
Chat with Fin or Coco right now on mobile.
Start talking through the problem here. Switch to desktop when you're ready to code and run tests.
Start coaching sessionStart a coached rep now. Sign in before or after the session so StrongYes can save what you struggled with to your prep memory.
Email me this coached-rep link
Desktop required
Sorry - mobile cannot run the editor and tests yet. Use the next step below or email yourself a link to continue on desktop.
Bit Manipulation gives you a useful next rep while you are still on your phone.