Tip 1 : Start from the basics.
Tip 2 : Increase the question difficulty gradually along with practice
Tip 3 : Master Computer fundamentals- OPPS, OS, SQL
Tip 1 : Make it simple and crisp. As you need to answer all in-depth questions related to it
Tip 2 : Avoid writing projects/skills you are not very versed with
Consist of 5 MCQs and 2 coding questions.



You can’t sell without buying first.
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
I have used DP to solve this question.
As this was a coding round normal brute force would have given TLE.



String ‘P’ is lexicographically smaller than string ‘Q’, if :
1. There exists some index ‘i’ such that for all ‘j’ < ‘i’ , ‘P[j] = Q[j]’ and ‘P[i] < Q[i]’. E.g. “ninja” < “noder”.
2. If ‘P’ is a prefix of string ‘Q’, e.g. “code” < “coder”.
N = 4
A = [ “ab” , “abc” , “a” , “bp” ]
Explanation :
Only prefix of the string “a” is “a” which is present in array ‘A’. So, it is one of the possible strings.
Prefixes of the string “ab” are “a” and “ab” both of which are present in array ‘A’. So, it is one of the possible strings.
Prefixes of the string “bp” are “b” and “bp”. “b” is not present in array ‘A’. So, it cannot be a valid string.
Prefixes of the string “abc” are “a”,“ab” and “abc” all of which are present in array ‘A’. So, it is one of the possible strings.
We need to find the maximum length string, so “abc” is the required string.
It is a simple counting problem, we just need to find the consecutive count of each character.
It was a telephonic round that was scheduled for the morning.
I was asked around 2 coding questions and then OPP concepts. The interviewer was kind enough to explain any doubt patiently.



N = 4
Edges = [2 3], [4 3], [1 3]
Output: 2
Here node 4 is at a distance 2 from node 1 and if we make node 1 as a root, it will give the height of 2, which is the maximum possible in this tree.
I used the recursive approach to solve it. Traveling at each node and storing the current height.
Then the interviewer asked me about the iterative approach as well. I then told Level order traversal approach.



I first used two for loop traversal approach with n*2 complexity.
Then I used the the Kandane's algo to solve the question.
Questions about Inheritance, Polymorphism, etc. And to explain using some examples.
Tip 1 : Read OOP concepts with examples. No need to go in-depth with them. Just be aware of them
This was mostly a Hiring Manager round. In this, they were mostly asking questions about CV. About all the projects that I have done. What challenges did you face, what did you learn from it, etc. Also, I was asked about the stock question from the first round. I was asked to write a pseudo code for that.
Also SQL queries, a lot of them.
Overall very chill and easy round.
I was asked to write multiple sql queries for an example db. Like getting all records with some conditions, self join, left join, etc.
Tip 1 : Just prepare top SQL interview questions, I think you will be fine.

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