Tip 1 : Participate in contest it would improve your examination temperament.
Tip 2 : Prepare OOPs, Networking, OS and System design along with DSA
Tip 3 : Make good projects (at least 2).
Tip 1 : Don't bluff in resume.
Tip 2 : Add coding profiles as it shows you have explored and shown interest in coding.



If an interval ends at time T and another interval starts at the same time, they are not considered overlapping intervals.



It was around 2 to 3 pm and interviewer was very friendly.
a. Given an big queue of below struct:
struct Log {
string machineName; //M1, M2…
string errorCode; //E1, E2…
int level; //0-error, 1-warning, 2-info
};
Write a program which can read the queue and generate the below information when the total number of logs with level 0 and 1 reach more than a threshold.
M1 E1 count
M1 E2 count
M2 E1 count
M2 E2 count
I used unordered map of unordered map which keeps track of count for machine code and error code as [machine code][error code] = count and the question can be easily solved afterwards.
Interviewer told me to do this in more systematic manner I used OOPs concepts and he was happy with that



I straight away applied depth first search on this problem and maintained a count of water bodies in the answer variable. This was the most optimal solution, so he twisted this question and asked another one.
It was around 4 to 5pm and interviewer was at very senior level.



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].
I first explained O(n^2) approach to the interviewer and he asked me to optimise. I then used kadane's algorithm and he asked me to code it. I coded and he asked me to find the print the subarray also. I added two if else statements in loop as follows:
for(i=0; i prev_max){
end = i;
start_o = start;
prev_max = curr_max;
}
}

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?