What should the dry run track?

Practice this question from Number of 1 Bits - Brian Kernighan Pattern Practice Quiz, with options and an explanation.

Question

What should the dry run track?

Option A — Correct answer

Track n after each cleared set bit and the count.

Option B

Only the final answer, not the bit state

Option C

The alphabetical order of variable names

Option D

Only whether input is sorted

Explanation

Track n after each cleared set bit and the count.

Number of 1 Bits - Brian Kernighan Pattern Practice Quiz

All questions · Previous question · Next question

Open on QuizMaker