Deadlock-Free Account Transfer - Quant Developer Interview Question
Difficulty: Medium
Category: concurrency
Asked at: Jump Trading, Citadel, Tower Research, Optiver, HRT
Topics: c++, concurrency, mutex, deadlock, multithreading
Problem Description
High-frequency trading systems require robust concurrency controls to manage shared resources like order books and account balances without latency spikes or deadlocks. Efficient locking strategies, such as those provided by C++17, are essential for maintaining data integrity and system stability under high contention.
Task
Implement the transfer method within the AccountManager class to safely move funds between two accounts identified by fromId and toId. The implementation must utilize std::m
Practice this medium developer interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.