Tip 1 : Problem Solving with DSA on websites such as leetcode, pepcoding, codechef really helped(around 200 questions).
Tip 2 : Should have good understanding of core concepts, go through the interview questions.
Tip 3 : Take some time to study low level design as well.
Tip 1 : Should have at least two working projects
Tip 2 : Good to have some open source experience as well.
There were around 15-20 MCQ questions and 5 subjective questions (one word) based on all the categories including operating system, computer networks, DSA and DBMS. Questions were not hard per say but a few of them required some time. The last question was a coding questions based on Dynamic Programming.



It is possible for Mr. X to rob the same amount of money by looting two different sets of houses. Just print the maximum possible robbed amount, irrespective of sets of houses robbed.
(i) Given the input array arr[] = {2, 3, 2} the output will be 3 because Mr X cannot rob house 1 (money = 2) and then rob house 3 (money = 2), because they are adjacent houses. So, he’ll rob only house 2 (money = 3)
(ii) Given the input array arr[] = {1, 2, 3, 1} the output will be 4 because Mr X rob house 1 (money = 1) and then rob house 3 (money = 3).
(iii) Given the input array arr[] = {0} the output will be 0 because Mr. X has got nothing to rob.
This is a follow-up question of house robber in which we take the maximum of the max value till (i-2)'th element and add i'th element to it and the max till (i-1)'th element., the answer would the max till the last element.
However since this is a circular array, we are just extending from the logic that if house i is not robbed, then you are free to choose whether to rob house i + 1, you can break the circle by assuming a house is not robbed.
Since every house is either robbed or not robbed and at least half of the houses are not robbed, the solution is simply the larger of two cases with consecutive houses, i.e. house i not robbed, break the circle, solve it, or house i + 1 not robbed. Hence, the following solution. I chose i = n and i + 1 = 0 for simpler coding. But, you can choose whichever two consecutive ones.
The interview was at 1pm, the interviewer introduced himself, asked me to introduce myself and asked me two questions.



1. If ‘k’ is not present in 'arr', then print -1.
2. There are no duplicate elements present in 'arr'.
3. 'arr' can be rotated only in the right direction.
Input: 'arr' = [12, 15, 18, 2, 4] , 'k' = 2
Output: 3
Explanation:
If 'arr' = [12, 15, 18, 2, 4] and 'k' = 2, then the position at which 'k' is present in the array is 3 (0-indexed).
The idea is that when rotating the array, there must be one half of the array that is still in sorted order.
For example, 6 7 1 2 3 4 5, the order is disrupted from the point between 7 and 1. So when doing binary search, we can make a judgement that which part is ordered and whether the target is in that range, if yes, continue the search in that half, if not continue in the other half.



Put each number in its right place.
For example :
When we find 5, then swap it with A[4].
At last, the first place where its number is not right, return the place + 1.
This was an unorthodox round with a mixup of everything.


Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
What is caching?
DB schema structure for an E-Commerce website. I had a project of an e-commerce website on my resume that's why I believe this question was asked.
Tip : Don't be afraid to ask questions, it's more of a discussion rather than an interview.
This round was with the CTO of Park+.



A Sudoku solution must satisfy all the following conditions-
1. Each of the digits 1-9 must occur exactly once in each row.
2. Each of the digits 1-9 must occur exactly once in each column.
3. Each of the digits 1-9 must occur exactly once in each of the 9, 3x3 sub-grids of the grid.
You can also assume that there will be only one sudoku solution for the given matrix.
The idea is simple try every number from 1-9 on every single empty block and check the row, column and 3x3 grid if the number already exists, if yes don't continue and try with a different number and if no try with the next empty block.

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