Tip 1: Always remember that question-solving is not everything in the interview, it's a part of the interview. Communicating well with the interviewer is the most important thing during the interview.
Tip 2: Also, practice a lot of Data Structures and Algorithms based questions that I have practiced from Coding Ninjas and on other coding portals.
Tip 3: Be consistent in your practice
Tip 1: Mention good projects and only those skills in which you are confident.
Tip 2: Justify your resume
Knapsack problem



This was solved by me through dynamic programming. Let dp[i][j] denote the maximum possible weight you can fill in the bag with a total capacity of j using exactly one stone of each color from 1 to i. Now you can club all same-colored stones in a vector. Then this problem is same as the classical knapsack problem and I passed all test cases and selected for the next round.
It was face to face interview consisting of two dsa based questions



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
Firstly I gave recursion approach but then the interviewer asked me to optimize that so I gave him a standard DP approach for the longest increasing subsequences by storing the result and use them for future calculations of bigger problem.



Input: Let the binary tree be:

Output: [10, 4, 2, 1, 3, 6]
Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
I simply used level order traversal and the concept of horizontal distance. Whenever we encountered the first node for a particular horizontal distance then we store that in the map and at last in the map we have tree top view. The interviewer asked me to write its code and I wrote a clean and commented code for it and he was satisfied with that.
HR round was there. It was very smooth.
1. Tell me about yourself and your family background.
2 Major challenges you faced during your college time
3. Strength and weaknesses
Tip 1: Whatever you are replying to, please try to justify your answer
Tip 2: Always be honest
Tip 3: Eye contact is very important

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