Tip 1 : Make sure that you have good understand of data structures, Algorithm and OOPS
Tip 2 : Practice as many problems as you can in any platform that you are comfortable on.
Tip 3 : Have a decent knowledge on SQL, DBMS, OS, computer networks
Tip 1 : Keep your resume short preferably 1 page and make sure its communicating all points
Tip 2 : Add only those thing that you are confident on.



‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’.
‘ARR1’ = [3 4 6 9 10]
I have used the merge logic that is used in merge sort algorithm.



'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
I had used stack to solve this problem.
Iterated through the array with two condition
1. if its open braces than add that in stack
2. if its closed then validate that peek element in stack
3. if step 2 is false then break the loop and return false.
4. After the iteration if stack is empty then return true else return false



(1) Do not use data types with the capacity of more than 32-bit like ‘long int’ or ‘long long int’ in C++. The problem is meant to reverse the integer using a 32-bit data type only.
(2) You should assume that the environment does not allow storing signed or unsigned 64-bit integers.
Since its online I tried converting the integer to string and reversed that and it passed all the cases. For logical approach refer this article
Build a file-based key-value data store that supports the basic CRD (create, read, and delete)operations. This data store is meant to be used as local storage for one single process on one laptop. The data store must be exposed as a library to clients that can instantiate a class and work with the data store.
Tip 1 : store the key value pair in specific format in file, so that while doing CRUD we can able to differentiate the pair stored in file


The deepest leaf node is the leaf node which will be the left child of some node and will be at the maximum level in the tree.
If there are multiple deepest left leaf nodes, return the node with maximum value.
1. A binary tree is a tree in which each node can have at most two children.
2. The given tree will be non-empty i.e. the number of non-NULL nodes will always be greater than or equal to 1.
3. Multiple nodes in the tree can have the same values, all values in the tree will be positive.
Firstly I have two approaches in my mind one is through the recursion and other through BFS.
Since its straight forward problem I decided to solve this with BFS.
I have used BFS traversal logic and had track of leftmost node in each level once the traversal is completed then leftmostnode contains the result.
1. To do level order traversal in BFS we need to add a null in the queue once after adding the last element in the level
2. By using that null we can able to figure out whether we reached end of the level or not.
3. once we reach the null we need to pop that null and store the next element in leftMostNode.
4. when the traversal is done we can return the leftMostNode.
He is fine with the approach and asked me to code the same.



Let’s say we have an array 'ARR' {10, 12, 20, 30, 25, 40, 32, 31, 35, 50, 60}. Then we have to find the subarray {30 , 25 , 40 , 32 , 31 , 35} and print its length = 5 as our output. Because, when we sort this subarray the whole array will be sorted.
I couldn’t thing the brute approach for the problem during my interview, but some how managed to get an idea of optimal solution.
The approach that I used was:
1. Have two variable which point start index and end index of array.
2. Now find the first element from start of the array which is less that the previous element. store this index in variable let's say 'startIndex'
3. Now find the first element from end of the array which greater than its next element. store the index in variable lets say 'endIndex'
4. Now find the 'max' and 'min' value in the subarray from startIndex to endIndex.
5. check if any value is greater than the min from 0 to startIndex in the array. if any then update startIndex with that index
6. check if any value is less than the max from endIndex to len(array) - 1 in the array. if any then update endIndex with that index
7. Return the startIndex and endIndex



• The given leaf node becomes the root after the inversion.
• For a node (say, ‘x’)
○ If there exists the left child that is not yet taken then this child must become the right child of ‘x’.
○ If the left child is already taken then the right child is still on the right side of ‘x’.
• The parent of ‘x’ must be the left child of ‘x’.

Consider the above binary tree (image- before inversion), if the given leaf node is ‘1’ then the binary tree after inversion becomes exactly the same as given in the image representing after inversion.
The given binary tree will only have distinct values of nodes.
I explained the approach of swaping the child two nodes while traversing each node. The interview was fine with that approach
You have got someone working for you for five days and a gold bar to pay him. You must give them a piece of gold at the end of every day. What are the fewest number of cuts to the bar of gold that will allow you to pay him 1/5th each day?
Tip 1 : I used have a habit of learning puzzle when I get bored solving problems during my interview preparation. Luckily that habit helped me here.
I was Asked to code some basic SQL queries. All them were really simple if you know the basics of SQL.
Tip 1 : Do practice for SQL queries in hacker rank when you find that helps a lot.
This Round the HR checks whether you will be good fit for culture code that's followed by the company.
Tell me about yourself.
How will you learn new coding language if asked to work on that?
Why do you want to join this company?
Tip 1 : Try to answer the question by comparing some past situation that you had faced.

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