Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
51
:
35
Back to Dashboard
Packet Buffer
Medium
Design a PacketBuffer class that manages a fixed-capacity in-memory buffer for incoming data. Data is flushed to disk in chunks when the buffer fills. Implement the following:
PacketBuffer(capacity): initializes the buffer with the given capacity (maximum number of characters it can hold) ...