Tip 1 : Practice DP based questions as much as you can.
Tip 2 : Also, be confident during the interview about your solution. For practice, you can prefer Coding Ninjas and Geeks For Geeks.
Tip 1 : Keep it short.
Tip 2 : Mention the academic and professional projects you've done. Add your educational details properly with percentage or CGPA obtained.
- Morning time
- Environment was good.
- No
- Interviewer was good



Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
s1- I had practiced enough of DP questions.
s2- so this one looked fairly easy. Since it was a standard DP question, the same approach worked here too.
- Morning time
- Environment was good.
- No
- Interviewer was good



Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]
Output: 11
Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
s1- I used Kadane algorithm here to find subarray with maximum sum.
s2- It is a standard question for interview follow DP practices.



Given 'NUM' : 1.75
Irreducible fraction can be represented as 7/4.
Note that 14/8 = 1.75 as well, but 14/8 is not an irreducible fraction.
In order to preserve precision, the real number will be given to you in the form of two strings : the integer part, and the fractional part.
The integer part will contain not more than 8 digits, whereas the fractional part will always contain 8 digits.
s1- I was unable to solve this question in given time. I thought of using decimal precision and other things but not able to solve this.
s2- Given a decimal number as N,
s3- Apply co-primes other common divisor other than 1.
- Morning time
- Environment was good.
- No
- Interviewer was good



For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3
1
/ \
2 3
/ \
4 5
Output: 2
Explanation :
In the zeroth minute, Node 3 will start to burn.
After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.
After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree.
So, the whole tree will burn in 2 minutes.
s1- This was a completely different question for me. I had not seen this question before, but by drawing various cases on paper,
s2- I could write down the solution at the end. Also, I struggled a lot during this question but did not give up. I kept thinking out loud in order to at least explain my thought process to the interviewer, if not arrive at the right solution.



As this value might be large, print it modulo 10^9 + 7
s1- For this question, I simply used some mathematics and considered the frequency of each element and their contribution to subsequences.
s2- Wrote its fully commented code with neat handwriting.



For 'N' : 4
Pattern :
4 3 2 1 2 3 4
3 3 2 1 2 3 3
2 2 2 1 2 2 2
1 1 1 1 1 1 1
2 2 2 1 2 2 2
3 3 2 1 2 3 3
4 3 2 1 2 3 4

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?