Embercode
✕
Dynamic ProgrammingQuick quiz

Bitmask assignment

6 questions. Covers Bitmask DP in Python: assigning tasks to people.

Questions 1 to 5 of 6

  1. 1. The best table in the assignment program has one slot for each set of tasks, so with 16 people it has 2^16 slots. Each slot holds one 8-byte reference to an int. How many bytes does one best list take, ignoring the int objects and the list header?

    Type a number.

  2. 2. The table method does at most 2^n * n steps for n people. For 15 people, what is the most steps it can take?

    Type a number.

  3. 3. In this program's cost table, what does a None entry mean?
  4. 4. Why does the program process the masks in increasing numeric order?
  5. 5. What does this program print? ``python mask = 0b0110 print(mask.bit_count()) print((mask & (1 << 1)) != 0) print(mask | (1 << 0)) ``

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.