PREPARATION TIP:
Tip1- Don’t create panic in any case in the interview , as even if you are not selected you will learn a lot from your interview experience and perform well in the future.
Tip2- Also I would recommend you Coding Ninjas as according to me it is a good platform to learn basic coding concepts and to practice coding.
Tip3- Do atleast 2 projects
Tip 1 : Have projects related to the skills mentioned in the job description.
Tip 2 : Be perfect with the things that you put on resume. If you feel not confident enough remove them from resume.
- 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].
My Approach
s1- Given an array and an integer K, find the maximum for each and every contiguous subarray of size k.
s2- Examples :
Input: arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}, K = 3
Output: 3 3 4 5 5 5 6
s3- Explanation:
Maximum of 1, 2, 3 is 3
Maximum of 2, 3, 1 is 3
Maximum of 3, 1, 4 is 4
Maximum of 1, 4, 5 is 5
Maximum of 4, 5, 2 is 5
Maximum of 5, 2, 3 is 5
Maximum of 2, 3, 6 is 6

Change in the input array/list itself. You don't need to return or print the elements.
s1- Converting a min heap to a max heap. There can be multiple max heaps possible. Any max heap will be good.
- Morning time
- Environment was good.
- No
- Interviewer was good



s1- Create a set to check if the character has occurred before or not
s2- I solved it using the sliding window concept
s3- Iterate through the string and find the ans through ans=max(ans,j-i+1)



The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.
The number of edges between two nodes represents the length of the path between them.
Input: Consider the given binary tree:

Output: 6
Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.
s1- Find left and right height of the tree at each node
s2- Diameter will be the maximum of left height+ right height
- Morning time
- Environment was good.
- No
- Interviewer was good



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
s1- Using stack push/pop operations this problem can ve solved



You need to change in the given array/list itself. Hence, no need to return or print anything.
s1- Sort by using Insertion sort
s2-print the sorted array/list elements in a row separated by a single space.

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?