Module 15 ¡ bitset and Bit Tricks: Sixty-Four Booleans in One Word
Five Programs That Give Each Bit a Job
Free with an accountReading
Amara has several small jobs on her desk. One uses option flags, another checks numbered tokens, and another marks possible package weights. The stored bits look similar. Their meanings, update rules, and valid ranges are different.
Checking what this lesson needs for youâĻ
What is inside Five Programs That Give Each Bit a Job
- Options fit inside an unsigned mask
- Seen means a bounded identifier exists
- Alignment turns movement into shifts
- Reachability instead of counts
- Exactly one choice needs replacement
- A sieve marks composite numbers
- Choose what must survive the update