Tip 1 : OOPs concept is a must have/ design patterns is a plus.
Tip 2 : Prepare Graphs and DP well, this will outshine you from crowd.
Tip 3 : If experienced, prepare your project well and be ready to manage surprises(deep knowledge is a must have)
Tip 1 : Mention your achievements.(after all you need to sell your skills )
Tip 2 : In case not having relevant experience, start developing from free resources, preferably using spring boot.
Was a medium level online Hackerrank assessment test. Only 60 minute was allowed time and there was no time to search online. Camera was not there but full screen access was taken. Was given a 3 days to attempt the test.



Let us say we have array 'ARR' =[-1,3,5,-2,4,-9]. The longest sub-array with the positive product is [3,5,-2,4,-9].
It was a DP problem. The idea here is to maintain the count of positive elements and negative elements such that their product is positive. Was a hard problem. The algorithm used is taken from GFG.
Initialize the variable, say res, to store the length of the longest subarray with the positive product.
Initialize two variables, Pos and Neg, to store the length of the current subarray with the positive and negative products respectively.
Iterate over the array.
If arr[i] = 0: Reset the value of Pos and Neg.
If arr[i] > 0: Increment Pos by 1. If at least one element is present in the subarray with the negative product, then increment Neg by 1.
If arr[i] < 0: Swap Pos and Neg and increment the Neg by 1. If at least one element is present in the subarray with the positive product, then increment Pos also.
Update res=max(res, Pos).
I was told to give my brief intro. Then they asked my find the maximum path sum between two leaves of a binary tree question.
Was asked about time and space complexity in detail. Then interviewer asked about my work experience in previous organization. Then few questions were asked related to java (Garbage Collector).



1) Find the maximum sum from leaf to root in the left subtree of X.
2) Find the maximum sum from leaf to root in the 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.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?