Tip 1 : Focus on DSA practice
Tip 2 : Make development projects
Tip 3 : Practice regularly
Tip 1 : Try to follow a basic format and highlight important achievements
Tip 2 : Mention atleast 2 good projects
Test was for 120 minutes. Environment was good because it was online test.



N = 3
A = [ 3, 4, 5 ]
Explanation :
One of the optimal ways to play the game is :
Ninja removes 3 stones from the first pile : [ 0, 4, 5 ].
Friend removes 3 stones from the second pile : [ 0, 1, 5 ].
Ninja removes 3 stones from the third pile : [ 0, 1, 1 ].
Friend removes 1 stone from the second pile : [ 0, 0, 1 ].
Ninja removes 1 stones from the third pile : [ 0, 0, 0 ].
Thus Ninja wins the game here.
Use hp[i][j] to store the min hp needed at position (i, j), then do the calculation from right-bottom to left-up.
Note: adding dummy row and column would make the code cleaner.



First create a queue of pair and push only those elements in the queue which is rotten, after that run while loop until queue is empty and pop elements and push nearby elements which is not rotten and make them rotten.
Return the count that how much time that while loop running.
It was 10 am, and interviewer was good and I was comfortable in that situation.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Initialize three pointers prev as NULL, curr as head, and next as NULL.
Iterate through the linked list. In a loop, do the following:
Before changing the next of curr, store the next node
next = curr -> next
Now update the next pointer of curr to the prev
curr -> next = prev
Update prev as curr and curr as next
prev = curr
curr = next



‘ACE’ is a subsequence of ‘ABCDE’ because ‘ACE’ can be formed by deleting ‘B’ and ‘D’ without changing the relative order of characters. ‘ADB’ is not a subsequence of ‘ABCDE’ because we can get ‘ABD’ from ‘ABCDE’ but not ‘ADB’ and in ‘ADB’ relative order of ‘B’ and ‘D’ are different from original strings.
1.Strings ‘STR1’ and ‘STR2’ consists only of English uppercases.
2.Length of string ‘STR2’ will always be greater than or equal to the length of string ‘STR1’.
For example, the given ‘STR1’ is ‘BAE’ and ‘STR2’ is ‘ABADE’.
String ‘STR1’ is a subsequence of string ‘STR2’ because ‘BAE’ can be formed by deleting ‘A’ and ‘D’ from ‘ABADE’ and the relative ordering of the characters of the string ‘ABADE’ persists.

Run from end of both strings and each time if s[i]==t[j] then i-- and j-- and if s[i]!=t[j] then j--. If in the end i comes to be -1 it means whole string is found in sequence in t
Where do we use DBMS?
Some SQL queries
Tip 1 : Read DBMS thoroughly
Tip 2 : Practice SQL queries
Tip 3 : If you know SQL, its a plus point.
Timing was 12 pm.
Environment was good.
Interviewer was very friendly.



If the given grid is this:
[7, 19, 3]
[4, 21, 0]
Then the modified grid will be:
[7, 19, 0]
[0, 0, 0]
In this , first approach i told to store which column and rows has zeroes in a separate matrix and then run a loop again , and make row and column zero containing zeroes. Interviewer asked me to optimize this by reducing the space complexity. So next approach i gave was that we can store zero at 0th index of every column and row if any zeroes exist in that column or row.



If there is no square sub-matrix with a sum less than or equal to K, then return 0.
nice r*r*c attempt, using prefix sum.
I looped through height of every rectangle starting on index I (looped ) and then moved from left to right.
What are OOPS pillars?
What is the difference in encapsulation and abstraction?
How do you apply abstraction with an example and code?
Some more problems from abstraction in deep.
Tip 1 : Read OOPS concepts very thoroughly
Tip 2 : Focus on abstraction pillar more.
In this round, he asked me very basic HR interview questions as why do you want to join this company? where do you see yourself in 5 years? what are your expectations from company?
Why do you want to join this company?
Where do you see yourself in 5 years?
What are your expectations from company?
Tip 1 : Read about company in detail
Tip 2 : Know about your role very well
Tip 3 : Ask some questions from your side as well.

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?