Summary
Designed two queues using an array of fixed size N to efficiently utilize empty spaces after elements are popped.
Full Experience
Got this question in Rubrik interview.
Design two queues using an array of fixed size N.
The interviewer said you can use an external data structure but the elements must be in the queue.
The problem here is that once the elements in the queue gets popped, it creates empty space which must be then utilized.
How can we solve this problem?
Few approaches I have in my mind:
Create K blocks. Each blocks store N/K values.
Each block store indices from i x N/K to (i+1) x (N/K)
Doubly Linkedlist points to the blocks
DLL tail -> always empty blocks for fast query of empty blocks
class LinkedListNode:
self.start_index
self.end_index
self.next_node = NULL
Linkedlist -> Keep track of blocks
head1 -> start for queue1
head2 -> start for queue2
tail -> to get empty block
While popping if the block gets empty it is moved to tail and the head is moved to next node using pointer
Is this alright?
Interview Questions (1)
Design two queues using an array of fixed size N.
The interviewer said you can use an external data structure but the elements must be in the queue.
The problem here is that once the elements in the queue gets popped, it creates empty space which must be then utilized.
Summary
I interviewed with Rubrik for a New Grad 2025 role. After clearing an Online Assessment, I proceeded to two interview rounds focusing on system design and multithreading debugging, which ultimately resulted in a rejection.
Full Experience
Hello Everyone!! I wanted to share my interview experience with Rubrik for the 2025 Grad role. A recruiter reached out to me directly for this position. The overall process took place during the 2nd and 3rd week of September. First, I completed an Online Assessment which lasted 1 hour. It consisted of 1 DSA question (based on DP on strings, though I can’t share the exact problem) and 10 MCQs on Multithreading and Concurrency. I cleared the OA and got a call for interviews. The recruiter scheduled 2 interviews on consecutive days.
Round 1 had two interviewers present. The main question was to Design and implement a Linux file system. It was quite an open-ended problem, so I spent a good amount of time asking clarifying questions. I managed to fully implement three parts and partially complete a fourth part. The last 10 minutes were dedicated to an open Q&A with the interviewers.
Round 2 was a debugging round, held the next day. The interviewer presented me with a multithreading/concurrency-based code and tasked me with finding and fixing all bugs, then providing a proper running code within 50 minutes. I successfully identified the main bug, which was a deadlock, and attempted to fix it. Unfortunately, after my fix, the code failed to compile. I spent a significant amount of time trying to resolve this compilation issue and, consequently, couldn't address the other bugs. At the end, the interviewer explicitly mentioned that they expected a fully working code solution.
Result: I was rejected after these two rounds. Despite the outcome, it was a great learning experience, and I genuinely enjoyed the process. I hope sharing this helps others preparing for similar interviews. Feel free to drop any questions in the comments, and I'll be happy to answer them. All the best! ✨
Interview Questions (2)
Design and implement a Linux file system. This was an open-ended problem where I had to ask a lot of clarifying questions. I managed to fully implement 3 parts and partially complete the 4th part during the interview.
I was given a multithreading/concurrency-based code and asked to find and fix all bugs, then provide a proper running code within 50 minutes. I identified the main bug as a deadlock and attempted to fix it. Unfortunately, after my fix, the code failed to compile, and I couldn't resolve this or address other potential bugs.
Summary
I recently interviewed for a Software Engineer (L4) position at Rubrik, undergoing five rounds focusing on system coding, algorithms, system design, and a hiring manager discussion. The process heavily emphasized multithreading, concurrency, and OS fundamentals, and I am currently awaiting a response from the recruiter.
Full Experience
I recently attended five interview rounds for the SWE (L4) role at Rubrik, which focused significantly on multithreading, concurrency, and synchronization techniques, along with OS fundamentals. The structure was as follows:
- System Coding 1: This round delved into concurrency, multithreading, process management, memory management, and synchronization concepts. I was asked to design a job scheduler that efficiently runs jobs with dependencies, assuming a function to get available jobs based on finished ones.
- Algo Coding: This round featured a Medium to Hard LeetCode-style question. I received a stream of data and for each new item, I needed to return the minimum absolute difference between any two elements among the last K elements in the stream.
- System Coding 2: The problem here involved designing a system for a playground accessible by only one team at a time, with a maximum of 10 concurrent players. The challenge was to manage multiple players from different teams trying to access it simultaneously, while also preventing player starvation.
- System Design: I was tasked with designing a system similar to LinkedIn Connections that could efficiently answer queries about the degree of connection between two users (e.g., 1st-degree for direct connections, 2nd-degree for friends of friends) for up to 1 billion users.
- Hiring Manager and Technical Deep Dive: This final round was a deep dive into one of my past projects, where I discussed challenges faced and decisions made. It also included several behavioral questions.
Interview Questions (4)
Design a job scheduler that runs all available jobs in an optimized manner, considering job dependencies. You can assume the existence of a function get_next_jobs(finished_jobs) that returns all jobs whose dependencies are fully satisfied based on the currently finished jobs. A job can only be executed after all of its parent (dependent) jobs are complete.
You will receive a stream of data. For each item, return the minimum absolute difference between any two elements among the last K elements in the stream.
There is a playground that can be accessed by only one team at a time, with a maximum of 10 players allowed concurrently. Multiple players from different teams may attempt to access the playground simultaneously. How would you design the system to assign players to the playground while enforcing these constraints? (They will ask about different approaches you can take to avoid starvation of any player)
Design a system similar to LinkedIn Connections that can answer the query: "How many levels (or degrees) of connection exist between two users?" For example, direct connections are 1st-degree, friends of friends are 2nd-degree, and so on. The system should efficiently handle up to 1 billion users.
Preparation Tips
To prepare for these interviews, I concentrated on mastering fundamentals, particularly in multithreading, concurrency, and OS concepts like memory management and process synchronization. For the system coding rounds, which differed from typical FAANG interviews, I gathered recent interview questions from platforms like LeetCode and Reddit. My approach involved solving one question at a time, identifying all necessary underlying concepts, and then studying those concepts in depth. I found it beneficial to treat the interviews as discussions, focusing on sharing my opinions and reasoning rather than just finding a perfect solution.