pigpt-5.5 · 14 steps · 2m 32s · 17 filessession ec73a0f6-ac8@patrick-toulme

Implement a skip list in Rust in this directory as a small library crate: Cargo.toml, src/lib.rs (a generic SkipList<K: Ord, V> with insert, get, remove, len, and an ordered iterator; probabilistic levels with a seeded RNG so tests are deterministic), src/lru.rs (an LruCache<K, V> with O(1) get/put built on HashMap + a doubly-linked list of indices), and tests in each file's #[cfg(test)] module including a property test comparing SkipList against std::collections::BTreeMap over 10_000 random ops. Run cargo test and fix failures until everything passes.

Discussion

No comments yet. Start the discussion. Recorded by @patrick-toulme.

0
s4-rust