Tip 1 : Practice questions are a must to clear coding tests. As in for this job, only those candidates shortlisted for the interview round who solved all the questions in the coding round. So you should be prepared for this type of worst-case scenario.
Tip 2 : focus on core subjects too.
Tip 3 : Do atleast 1 project.
Tip 1 : Have some projects on resume.
Tip 2 : Have put your coding experience.
Tip 3 : Do not put false things on resume.



1. Buying a stock and then selling it is called one transaction.
2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again.
Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].
Output: 6
Explanation:
The maximum profit can be earned by:
Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3).
Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
Total profit earned will be (3 - 0) + ( 4 - 1) = 6.
int maxProfit(vector& prices)
{
int n=prices.size();
int profit,mi=INT_MAX;
int ans=0;
for(int i=0;i {
mi=min(mi,prices[i]);
profit=prices[i]-mi;
ans=max(profit,ans);
}
return ans;
}



Cost of entries where j < i will be represented as INT_MAX VALUE which is 10000 in the price matrix.
If ‘N’ = 3
'PRICE[3][3]' = {{0, 15, 80,},
{INF, 0, 40},
{INF, INF, 0}};
First, go from 1st station to 2nd at 15 costs, then go from 2nd to 3rd at 40. 15 + 40 = 55 is the total cost.It is cheaper than going directly from station 1 to station 3 as it would have cost 80.
The output will be 55.
I solved this problem using dynamic programming.



Consider an array of size six. The elements of the array are { 6, 4, 3, 5, 5, 1 }.
The array should contain elements from one to six. Here, 2 is not present and 5 is occurring twice. Thus, 2 is the missing number (M) and 5 is the repeating number (R).
Can you do this in linear time and constant additional space?
Step 1: First take an ans array and intialize with 0.
Step 2: Run a loop over the given array for storing the frequency of element in ans array.
Step 3: Run a loop over the ans array and if count 0 i.e missing and >1 repeating




In the above complete binary tree, all the levels are filled except for the last. In the last level, all the nodes in the last level are as far left as possible.
I solved using DFS approach to get the steps from source to destination.
What is Candidate key, Unique Key and Composite Key . He also asked about the term "indexing" and normalization type and their explanation.

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