Slug: chain-determinism-01 · Paired reading: Chapter 30
Prompt
fn fingerprint_balances(balances: &BTreeMap<u8, u128>) -> u128 —
rolling XOR/hash over sorted iteration. Also fn sorted_keys to show
BTreeMap order is part of the contract.
The curriculum, drills, tutor, and interviewer mode are for readers of Ace the Rust Interview. The code is printed in the Preface (Companion site access).
Don’t have the book yet? The landing page stays open — purchase unlocks this gym.
advanced · order 175
Slug: chain-determinism-01 · Paired reading: Chapter 30
fn fingerprint_balances(balances: &BTreeMap<u8, u128>) -> u128 —
rolling XOR/hash over sorted iteration. Also fn sorted_keys to show
BTreeMap order is part of the contract.