Tip 1 : Practise coding well before applying to companies
Tip 2 : Don't overlook behavioural questions
Tip 3 : Listen well when problem is explained and ask clarifying questions
Tip 1 : Clearly mention your roles and responsibilities
Tip 2 : Don't include anything that you don't know



Let the price of Ninja Coin for 5 consecutive days is [4, 2, 3, 3, 7].
Then the span of Ninja Coin on the 0th day is 1 because we cannot move backward from day 0.
The span of Ninja Coin on the 1st day is 1 because the price on day 0 is 4 which is greater than 2, so the only day 1 is counted.
The span of Ninja Coin on the 2nd day is 2 because the price on day 2 and day 1 is less than or equal to 3 and then on day 0 price is 4 which is greater than 3, so we count day 2 and day 1.
The span of Ninja Coin on the 3rd day is 3 because the price on day 3, day 2, and day 1 is less than or equal to 3, and on day 0 price is 4 which is greater than 3, so we count day 3, day 2, and day 1.
The span of Ninja Coin on the 4th day is 5 because its value is higher than all previous days values.
Thus you should return an array/list [1, 1, 2, 3, 5].



Let us say we have array 'ARR' =[-1,3,5,-2,4,-9]. The longest sub-array with the positive product is [3,5,-2,4,-9].
Can be solved in O(n^2) by considering all subarrays one at a time.



• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
1. All the elements of the Binary Search Tree are unique.
2. You can’t use the same node value/element of BST twice.
I was not able to solve it.
This round started with brief introduction and then discussion about the projects in my previous company.
This went on for about 10 minutes, then a coding problem was presented to me.



If the string is “bca”, then its permutations in lexicographically increasing order are { “abc”, “acb”, “bac”, “bca”, “cab”, “cba” }.
Given string contains unique characters.



This problem is a variation of finding connected components in a graph problem. We have to pick one node and then traverse all the connected components via BFS or DFS. This set of traversed node will form one island. Similarly traverse all the cell in the given matrix.
How does different application in OS can have single or multiple instance. How does one can configure it?
This round was a system design round with more emphasis on LLD.
Give the LLD of a call centre call/query management service. Give class design, API contracts and business logic.
Tip 1 : Revise common design questions well.
Tip 2 : Give emphasis to asking clarifying questions.

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?