Implement a FIFO Queue:
- put(int): Adds item into queue
- get() int: Removes and returns item in queue in FIFO order
Requirements:
- Fix sized memory buffer []int
- No dynamic memory allocation (not allocating new memory or objects as part of put + get()).
Follow up:
- Support for multiple thread access.
- Two queues which share this same fix sized memory buffer
- Need to support FIFO ordering for each queue individually.
- The size of this int[] (100MB - > 1GB+)
- We want to make sure usage of this fix sized array can be dynamically adjusted based on each indiv. queue's usage.
- Minimize memory wastage
Comments (5)


