Reported interview periodNot available
Build an Unbiased Randomness Adapter
Turn an unknown biased bit source into balanced choices, a sampled load estimate, and isolated concurrent batches.
Practice focusYou receive a hardware source raw bit() that independently returns 0 or 1 with one stable but unknown probability of returning 1 . The probability is strictly between zero and one, and no other random source is available. Implement the following four functions. Requirements 1. Extract balanced bits Read the raw source in fresh pairs. Discard pairs whose values match. For the first pair whose values differ, return its first value. A scripted source raises EOFError when exhausted; let that exception propagate, including for a partial pair.…