Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Technical Interview round where 2 DSA based questions were discussed.



1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Binary Search can be used in this problem.
Steps :
1) Use Binary search to get index of the first occurrence of x in the given array. Let the index of the first occurrence be i.
2) Use Binary search to get index of the last occurrence of x in the given array. Let the index of the last occurrence be j.
3) Return (j – i + 1);
Time Complexity: O(Logn)



One approach would be to traverse the tree and for every traversed node X :
1) Find maximum sum from leaf to root in left subtree of X
2) Find maximum sum from leaf to root in right subtree of X.
3) Add the above two calculated values and X->data and compare the sum with the maximum value obtained so far and update the maximum value.
4) Return the maximum value.
The time complexity of above solution is O(n2)
This question can also be solved in a single traversal of binary tree. The idea is to maintain two values in recursive calls :
1) Maximum root to leaf path sum for the subtree rooted under current node.
2) The maximum path sum between leaves (desired output).
For every visited node X, we find the maximum root to leaf sum in left and right subtrees of X. We add the two values with X->data, and compare the sum with maximum path sum found so far.

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