Logo

Question preview

Prison break

What this preview is

About this preview

Prison break is a medium quant interview question on concurrency in Rust.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

What this Rust concurrency question tests

This is a medium-difficulty concurrency question that asks you to reason through the runtime behaviour of a Rust program involving multiple threads or async tasks. It probes whether you understand Rust's memory-safety guarantees, synchronisation primitives, and what actually happens when concurrent code runs.

To answer correctly, you need to trace the program's execution, identify potential race conditions or deadlocks, and reason about how Rust's ownership and borrowing rules interact with concurrent access patterns. The question rewards careful analysis of thread scheduling, lock semantics, and data-race prevention rather than memorisation.

  • Ownership and borrowing across thread boundaries
  • Mutex, Arc, and shared-state synchronisation
  • Thread scheduling and execution order
  • Compile-time vs. runtime safety guarantees