Tip 1 : Practice as many questions as possible from any of the good coding platform.
Tip 2 : Core CS fundamentals should be strong and can't be neglected before interview.
Tip 3 : Some hands-on dev projects are really good to have as companies nowadays(mostly startups) look some good hands-on experience even in freshers.
Tip 1 : Should be single page, to the point and precise resume.
Tip 2 : Only put truth on the resume.



You can’t engage in multiple transactions simultaneously, i.e. you must sell the stock before rebuying it.
Input: N = 6 , PRICES = [3, 2, 6, 5, 0, 3] and K = 2.
Output: 7
Explanation : The optimal way to get maximum profit is to buy the stock on day 2(price = 2) and sell it on day 3(price = 6) and rebuy it on day 5(price = 0) and sell it on day 6(price = 3). The maximum profit will be (6 - 2) + (3 - 0) = 7.
We must know the concept of stock market that we must buy stocks at low price and sell it in high price. In this problem we use two pointer approach where left pointer will take care about buying and right is for selling the stocks.
Time Complexity: O(n) we just traverse the array 1 time for 1 transaction
Space Complexity: O(1) , extra space not required



Consider following matrix:

The rectangle (1,1) to (3,3) is the rectangle with the maximum sum, i.e. 29.

The idea behind this algorithm is to fix the left and right columns and try to find the sum of the element from the left column to right column for each row, and store it temporarily.
We will try to find top and bottom row numbers. After getting the temporary array, we can apply the Kadane’s Algorithm to get maximum sum sub-array. With it, the total rectangle will be formed.
Sample I/P :
1 2 -1 -4 -20
-8 -3 4 2 1
3 8 10 1 3
-4 -1 1 7 -6
Output :
The top left point and bottom right point of the submatrix, and the total sum of the submatrix.
(Top, Left) (1, 1)
(Bottom, Right) (3, 3)
The max sum is : 29



For a (6 x 6) board, the numbers are written as follows:

You start from square 1 of the board (which is always in the last row and first column). On each square say 'X', you can throw a dice which can have six outcomes and you have total control over the outcome of dice throw and you want to find out the minimum number of throws required to reach the last cell.
Some of the squares contain Snakes and Ladders, and these are possibilities of a throw at square 'X':
You choose a destination square 'S' with number 'X+1', 'X+2', 'X+3', 'X+4', 'X+5', or 'X+6', provided this number is <= N*N.
If 'S' has a snake or ladder, you move to the destination of that snake or ladder. Otherwise, you move to S.
A board square on row 'i' and column 'j' has a "Snake or Ladder" if board[i][j] != -1. The destination of that snake or ladder is board[i][j].
You can only take a snake or ladder at most once per move: if the destination to a snake or ladder is the start of another snake or ladder, you do not continue moving - you have to ignore the snake or ladder present on that square.
For example, if the board is:
-1 1 -1
-1 -1 9
-1 4 -1
Let's say on the first move your destination square is 2 [at row 2, column 1], then you finish your first move at 4 [at row 1, column 2] because you do not continue moving to 9 [at row 0, column 0] by taking the ladder from 4.
A square can also have a Snake or Ladder which will end at the same cell.
For example, if the board is:
-1 3 -1
-1 5 -1
-1 -1 9
Here we can see Snake/Ladder on square 5 [at row 1, column 1] will end on the same square 5.
The primary motive in this question is to find out the least amount of dice throws to reach the end from the source or a custom start point. The user has complete control over the outcome of the dice. This problem can be solved using DFS (Depth First Search), BFS (Breadth-First Search) or Dijkstra’s Algorithm.



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.



3 2 2
5 6 6
9 5 11
In the given matrix, 3 → 5 → 6 and 3 → 5 → 9 form increasing paths of length 3 each.
1) Build an inital graph given the input matrix, each edge will be a->b so that matrix[i][j] < matrix[i'][j'] for i' and j' 4-neighbor of i,j.
2) After that, run Kahn's algorithm for topological sorting, keep removing vertices and add its neighbors which in-degree equals 0.
3) Count how many times a new vertex is added to the Queue (this means that a new vertex has been discovered so our final answer should be incremented by 1).
4) Keep removing verfices until no more vertices are available and return the final answer.



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).
When array is rotated then two possiblities are :
1) low to mid part is sorted
a) if the target lies btw this part ` (target>= nums[low] and target<=nums[mid])`
then `high=mid-1;`
b) else target will be present after the mid `low=mid+1;`
2) mid to high part is sorted
a) if the target lies btw this part` (target>=nums[mid] and target<=nums[high])`
then `low=mid+1;`
b) else target will be present before the mid `high=mid-1`
This round was Hiring manager round with one of the Head Of Engineering in the company. Majorly it was knowing about me and my interest on which they can decide which team i should be aligned to if i get selected. It majorly covered my resume grilling, my projects, some technical discussions on how better projects could have been done so that it can maintain scale etc. Atlast he asked if i have any question for him, i simply said everything looks good as of now. We greeted each other and interview was ended.

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