Tip 1: Practice At least 20 questions from each topic like LinkedList, Graphs, Trees, and HashMap and all medium data structures.
Tip 2: try to complete the medium code in 30 mins of durations.
Tip 3: Prepare one coding language with which you are more comfortable.
Tip 1: Have some projects on your resume.
Tip 2: Never put false things.



You may assume that duplicates do not exist in the given traversals.
For the preorder sequence = [1, 2, 4, 7, 3] and the inorder sequence = [4, 2, 7, 1, 3], we get the following binary tree.

Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree.



'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Tip 1: Do not submit too much, sometimes IDE consumes much time for compilation.
Tip 2: Check for hidden test cases as well, some test cases maybe hidden.
Level 2 assessment is scheduled to be held on Mon, 12th October at 6 PM.



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.
Tip 1: Try to optimize your solution as time-limit errors may occur.
Tip 2: Most imp while solving the problem keep speak-up your thought process for building your solution.


1. Push(num): Push the given number in the stack.
2. Pop: Remove and return the top element from the stack if present, else return -1.
3. Top: return the top element of the stack if present, else return -1.
4. getMin: Returns minimum element of the stack if present, else return -1.
For the following input:
1
5
1 1
1 2
4
2
3
For the first two operations, we will just insert 1 and then 2 into the stack which was empty earlier. So now the stack is => [2,1]
In the third operation, we need to return the minimum element of the stack, i.e., 1. So now the stack is => [2,1]
For the fourth operation, we need to pop the topmost element of the stack, i.e., 2. Now the stack is => [1]
In the fifth operation, we return the top element of the stack, i.e. 1 as it has one element. Now the stack is => [1]
So, the final output will be:
1 2 1
It was around 10 AM.
Simple location preference, any other offers in hand, etc.
Tip 1: Do not speak to much.

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