Learn C++ STL

Lesson 4 of 9 · bitset and Bit Tricks: Sixty-Four Booleans in One Word

Module 15 · bitset and Bit Tricks: Sixty-Four Booleans in One Word

Choose the Representation Before Chasing Speed

Free with an accountReading

Kenji wants a bitset for every collection of yes-or-no answers. Zara asks how large the possible domain is. Maria asks whether the size comes from input. Amara asks what operations will run after the data arrives.

Checking what this lesson needs for you…

What is inside Choose the Representation Before Chasing Speed

  1. Ask about the domain first
  2. Compare the neighbours
  3. Follow the required operations
  4. Circular movement needs a frame
  5. Measure the workload
  6. Make the smallest honest decision