Tip 1 : Identify some interview prep list, keep coding, consistency is the key to success
Tip 2 : Have at least 2 projects on your resume, these things are discussed in the interview stage
Tip 3 : Practice "talk your thoughts" when you code, learn to communicate cleary what you and your code intend to do
Tip 1 : Have some projects on your resume
Tip 2 : Mention and emphasize your skills relevant to the company
Afternoon
Proctored - Camera and audio needs to be on
Negative marking for incorrect answers
Round mix of project questions, data structures and operating systems (process memory management in this round)
Scheduled in the morning
Held online on meet
The interviewer was helping and gave ample time to come up with answers



1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.
2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).
2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
1. I asked some clarifying questions to better understand the constraints of the problem like number of total calls, max value of capacity to consider, number of add calls.
2. The constraints made me to think for a single traversal method and data structure.
3. To define a unit, I defined a structure Node containing key and value.
4. Next I decided to use a doubly linked list to simulate the time stamps of the LRU cache, and the changes like deletion and updation can be done in 0(1) time if the entry/Node position is known.
5. I felt the need of a HashMap (unordered_map in C++) to retrieve the entires in 0(1) time, so that get queries and location of that unit can be found in 0(1) time.
6. Data structures finalised were doubly linked list and HashMap.
7. I was talking while I was coding the logic.
8. The presence of an entry can be found out by searching for the key in HashMap.
9. The only part that needs attention and will be repeated is that for each operation, the node needs to be added to front of LRU list and deleted from its previous position if any.
In the afternoon
Consisted of both Operating systems (mainly this, involving scheduler, process vs thread, memory security, etc), Interests (some questions based on my project), and Data structures
The interviewer was very helpful and it was more like a discussion sometimes working towards answers.



Consider ARR = [1, 2, 3, 4, 4], the duplicate integer value present in the array is 4. Hence, the answer is 4 in this case.
A duplicate number is always present in the given array.
1. I started speaking my thought process, stating that approaches like double traversal, sorting and traversal (along with their time complexities) are few intial ones coming to mind, but not the optimal one.
2. I then started thinking in direction of improving the time complexity.
3. I focused on the value of the elements being in range of [1,n].
4. This (along with my experience from preparations) gave me an idea of using these values as indices (-1 to make them 0 indexed).
5. The algorithm is to traverse(let's say currently at val) and mark the other element at its index (abs(val)-1) as negative. If that value which we are going to make negative is already negative then, it means that it is already been discovered, which in turns means that index+1 or abs(val) is the duplicate number.
Evening
It comprised of introduction to the nature of work in the team, basic requirements and the desired job location.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?