Rubrik
More Experiences
Recent Experiences
Latest from community
Rubrik | Systems Coding | Senior Software Engineer
January 15, 2025 • 0 reads
Summary
I interviewed for a Senior Software Engineer role at Rubrik, focusing on systems coding. The interview involved implementing a FIFO queue with specific memory and concurrency constraints.
Full Experience
I recently had an interview for a Senior Software Engineer position at Rubrik, which heavily focused on systems coding challenges. The main problem revolved around implementing a FIFO queue under strict memory management conditions, followed by complex multi-threading and memory sharing scenarios. I had to ensure no dynamic memory allocation while handling concurrent access and efficient partitioning of a large shared buffer between two independent queues.
Interview Questions (1)
Q1
Implement Fixed-Size FIFO Queue with Concurrency and Shared Buffer
Data Structures & AlgorithmsHard
Implement a FIFO Queue with the following methods:
put(int): Adds an item into the queue.get() int: Removes and returns an item from the queue in FIFO order.
Requirements:
- Use a fixed-sized memory buffer (e.g.,
[]int). - No dynamic memory allocation (not allocating new memory or objects as part of
putandget).
Follow-up 1:
- Support for multiple thread access.
Follow-up 2:
- Implement two queues that share the same fixed-sized memory buffer.
- Each queue must maintain its individual FIFO ordering.
- The size of this
int[]can be very large (100MB to 1GB+). - The usage of this fixed-sized array should be dynamically adjusted based on each individual queue's usage.
- Minimize memory wastage.