Tip 1 : Pratice DSA and focus on the core subject like Database and OS
Tip 2 : Practice atlest 2 question everday to maintain consistency.
Tip 1 : Crisp Resume : Every body knows about this step, you must create a crisp resume mentioning about your key skills, always add impact numbers if possible (for example : increased efficiency by 50%, reduced cost by 2X, etc.) Add keywords around your skills, highlight them using BOLD in resume.
Tip 2 : Use Linkedin : Send connections requests directly to the recruiters rather than asking for referrals.
Anytime



Input: 'arr' = [2, 2, 2, 2, 0, 0, 1, 0]
Output: Final 'arr' = [0, 0, 0, 1, 2, 2, 2, 2]
Explanation: The array is sorted in increasing order.
Count the number of 0s, 1s and 2s in the given array. Then store all the 0s in the beginning followed by all the 1s then all the 2s.



I tried it with a min-heap and insert all lengths into the min-heap. Extract the minimum and second minimum from min-heap. Add the above two extracted values and insert the added value to the min-heap. Maintain a variable for total cost and keep incrementing it by the sum of extracted values. Return the value of this total cost



I had already solved this question so i have pretty much good idea about the question.
So first,i tried to solving by storing the sum at every step in hashmap. Which was not time and space efficent.
then I solved this question by the Kadane’s algorithm.



The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.
The number of edges between two nodes represents the length of the path between them.
Input: Consider the given binary tree:

Output: 6
Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.
in this i have caluclated the height of left side tree then height of right side tree and added the result and returned the values in recursion. I have created one height function,and then call the function (left_height + right_height + 1) for each node and update the result.
This round was more aroung sytem design and my past work experience.
He asked me about the all the work project i have done , then he asked me about the overall architecture of the system, like how the system work.
Tip 1 : In this interviewer was trying to understand how depth knowledge i have on the system which i am currently working on.
Tip 2 : Understand the high level design of the system , how data follow and data store works.
He asked me to desgin a bookmyshow and then started asking question around the design
Tip 1 : The solution can never be a right or wrong, it’s like telling a story. The preparation for this round is really subjective. Start with the requirements and microservice which will need for system data follow then design db around that.
Tip 2 : Need to understand depth of systems to design good systems. Things like which database would you use, where will you implement caching, at what place you’ll go for async calls rather than sync calls.
This is non-tech round.They just want to check your nature ,attitude and team work skills.
This was a very small discussion where HR asked me why do you want to leave my current job and CTC that they are offering and all.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: