8.4. Exercises¶
8.4.1. Mandatory exercises¶
None
8.4.2. Recommended exercises¶
- Exercise 1 Testing a stack.
- Exercise 2 Testing a queue.
- Exercise 3 A resizable insert-only hash-table with a Bloom filter.
8.4.3. Exercise 1¶
Following the design from Section Testing OCaml Code, design and implement an in-line randomised testing procedure for stacks, which would insert an arbitrary sequence of elements via push
, extract them via pop
and ensured that LIFO property holds.
8.4.4. Exercise 2¶
Design and implement a randomised testing procedure for queues, which would insert an arbitrary sequence of elements via enqueue
, extract them via dequeue
and ensured that FIFO property holds.
8.4.5. Exercise 3¶
Implement a resizable insert-only hash-table with a bloom filter. Compare its performance to a regular resizable hash-table.