About this question
Hard · networking · Quant Developer interview question · sack, reliable-udp, bit-manipulation, networking, srt, retransmission, window
Custom reliable UDP protocols, used in high-frequency trading for low-latency market data, implement Selective Acknowledgement (SACK) to recover from packet loss. A SACK bitmap encodes which packets in a window have been received, allowing for targeted retransmission instead of the full window. This problem involves parsing such a bitmap to gather statistics on packet reception. Task Implement the function analyze_sack_bitmap(int bitmap, int window_size) to analyze a Selective Acknowledgement (