Jane Street Interview Question

Optimizing bakery operations in the given scenario