← ALL NOTES
Array

3508. Implement Router

Implement a router with a memory limit: addPacket(source,dest,timestamp) — duplicates (same triple key) are rejected; on overflow, the oldest is evicted (FIFO). forwardPacket() returns and removes…

Loading…