Tip 1: Focus on DSA (very important)
Tip 2: Learn System Design
Tip 3: Learn Multithreading
Tip 1: Don’t put false information.
Tip 2: Prepare extensively for cross-questioning.
It contained three medium-hard DSA questions based on trees and graphs.

I) Is not the King (i.e., is not the root).
II) Is rebellious (does not respect their parent).
III) Has no children who are loyal (i.e., all of its children are also rebellious, or it has no children at all).
Use tree traversal to find the rebellious nobles, and use a hashmap or a 2D matrix to manage the kingdom’s condition.

It is an easy question where we need to traverse the city by considering it as a matrix and solve for the entire matrix using conditions. Also, consider using graphs and DSU for optimal time complexity.


The maze may contain self-cycles.
arr[i] = -1 means the ‘i’th cell doesn’t have an exit.
First, find the cycle using any algorithm, but make sure to keep track of the tree with a hashmap and then calculate the sum.
It contained questions on Physics, core concepts, and programming.
Questions based on tension and the laws of motion on an inclined plane.
Tip 1: Basic knowledge of Physics and Math.
Tip 2: Strong calculation skills.
Questions based on collisions.
Tip 1: Focus on Physics.
Tip 2: Understand energy exchange during collisions.
It was an output-based question, so a line-by-line dry run was used to solve it.
Question regarding process management and process execution.
What is normalization? (Learn)
What is a deadlock and its necessary conditions? (Learn)
It contained a single tree-based question with 10 test cases, and you needed to pass 7 to clear the round.

1) Lock(X, uid): This operation attempts to grant an exclusive lock on the node X for the user uid. A lock can only be granted if:
I) The node X is not already locked.
II) No ancestor of X is locked.
III) No descendant of X is locked.
2) Unlock(X, uid): This operation releases a lock on node X. It can only be performed if:
I) The node X is currently locked.
II) The lock on X is held by the same user uid.
3) UpgradeLock(X, uid): This operation allows a user uid to lock an ancestor node X by atomically unlocking all of its descendants that they have locked. An upgrade is possible only if:
I) The node X is not currently locked.
II) X has at least one locked descendant.
III) All locked descendants of X are locked by the same user uid.
IV) If successful, X becomes locked by uid, and all its previously locked descendants become unlocked.
First, set up the basic structure of a tree node and the tree.
Then, create multiple helper functions and a hashmap for quick retrieval.
Finally, implement the upgrade, unlock, and lock functions.
The interviewer conducted the round via Google Meet. He asked resume-based questions as well as some DSA questions.
Key Differences Between GET and POST Methods. (Learn)
Tip 1: Knowledge of development.



'N' = 5, 'ARR' = [1, 2, 3, 2, 3]
Output: 1
Except for number 1, all numbers occur an even number of times.
First, I used a hashmap, but it was not the best approach.
Then, I tried bit manipulation, which turned out to be the optimal approach.



Basic BFS problem in a multi-component graph.
This round included operating systems, code optimization, and a difficult multithreading question.
The round was held on Slack, and sometimes I was called into a meeting for clearer discussion.
Optimize the code submitted in the 3rd round and implement the lock method in the tree-of-space question so that it works on a multi-core machine without using built-in mutexes, semaphores, or lock functions. The lock should be granular.
Firstly, I needed to optimize the code, for which I used a hashmap again. Then, for multithreading, I added another state for each node to specify whether it had been locked.
Secondly, I would lock the node by performing all the operations required during a normal lock first, ensuring the data remains consistent, and would revert all changes if, at any point, it was found that the node could not or should not be locked.
The interviewer pointed out many edge cases that needed to be resolved.
It was a system design round held at the office, and a senior software engineer conducted the interview.
This interview included both system and cultural rounds. I was asked puzzles and other software questions based on my resume.
You are designing a new programming language and have full control over it. Now, in the compiler or runtime environment of this language, you need to set up a garbage collector. How would you design a garbage collector for it?
Tip 1: First, clarify the requirements so that you don’t go in the wrong direction.
Tip 2: Develop a design and algorithm, identify all edge cases, and resolve them.
Tip 3: Don’t ask for hints at the beginning. First, try to develop multiple approaches yourself, and then ask for hints if needed.
What is a Process Control Block, and how does the heap store data? (Learn)
Tip 1: Focus on the operating system.
What is Redis caching?
Tip 1: Learn the caching requirements, use cases, and best practices.
What is encryption?
Tip 1: Learn about public and private keys.
Tip 2: Learn about symmetric and asymmetric hashing.
You have 3 wires with unusual and non-uniform shapes and sizes. Each wire burns completely in 10 minutes, but the rate of burning is not constant.
With 3 wires, how can you measure 15 minutes?
If you have only 2 wires, how can you measure 15 minutes?
Tip 1: Solve puzzles.
Tip 2: Be patient and think logically.
You have 25 cars and a racetrack where only 5 cars can race at a time. You don’t know the exact speed of each car; you only know the relative speeds of the 5 cars you race together at a time. Determine the top 3 fastest cars among the 25.
Tip 1: Solve puzzles.
Tip 2: Be patient and think logically.
Tip 3: Make sure to write as much information as you can, as it helps with easier analysis.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?