Tip 1 : Practice Atleast 250 Questions on GFG/Leetcode
Tip 2 : For DSA questions in interviews, start explaining from the brute force approach and then move to the optimal one. Convey your thought process to the interviewers, so that they can help you out if you get stuck.
Tip 3 : Do not write anything that you are not confident of in resume
Tip 4 : Do atleast 2 projects
Tip 1 : Try to include at least one development project in your resume.
Tip 2 : Interviewer will ask anything from your resume so be prepared for it.
Tip 3 : Don't mention some random projects which you are not sure about or copied from Google or somewhere else.
MCQs were based upon DS Algo, Code output, OOPS, DS Fundamentals
What will be the output of the following code snippet?
#include void solve() { int a[] = {1, 2, 3, 4, 5}; int sum = 0; for(int i = 0; i < 5; i++) { if(i % 2 == 0) { sum += *(a + i); } else { sum -= *(a + i); } } printf("%d", sum);}int main() { solve(); return 0;}
Ans : 3



Initialize:
max_so_far = INT_MIN
max_ending_here = 0
Loop for each element of the array
(a) max_ending_here = max_ending_here + a[i]
(b) if(max_so_far < max_ending_here)
max_so_far = max_ending_here
(c) if(max_ending_here < 0)
max_ending_here = 0
return max_so_far



There can be more than one subsequences with the longest length.
For the given array [5, 0, 3, 2, 9], the longest decreasing subsequence is of length 3, i.e. [5, 3, 2]
Try to solve the problem in O(N log N) time complexity.
char arr[] = str.toCharArray();
int n = arr.length;
int dp[] = new int[n];
dp[0] = 1;
int res = 1;
for(int i = 1; i < n; i++){
if(arr[i] <= arr[i-1]){
dp[i] = dp[i-1] + 1;
}else{
dp[i] = 1;
}
res = Math.max(dp[i], res);
}
return res;
This was the code pair round. In this round Interviewer gives you DSA problem and you have write the optimal code for the given problem.



The presentation’s duration can’t be changed. You can only change the start and end times.
Design a system for Toll Booth.

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?