Tip 1: Must do Previously asked Interviews and Online Test Questions.
Tip 2: Must have good knowledge of DSA
Tip 3: Do at least 2 good projects; you must know every bit of them.
Tip 1: Have at least two good projects explained in short with all important points covered.
Tip 2: Every skill must be mentioned.
Tip 3: Focus on skills, projects, and experiences more.
This was purely a DSA round, where I was asked 2 interview questions.



Initially, sort the given array. And declare a variable to store the minimum difference, and initialize it to INT_MAX. Let the variable be min_diff. Find the subarray of size m such that the difference between the last (maximum in case of sorted) and first (minimum in case of sorted) elements of the subarray is minimum. We will run a loop from 0 to (n-m), where n is the size of the given array and m is the size of the subarray. We will calculate the maximum difference with the subarray and store it in diff = arr[highest index] – arr[lowest index]. Whenever we get a diff less than the min_diff, we will update the min_diff with diff.



Initialize two variables prev0 and prev1 to 0 and -999999 respectively.
Loop through the input array from index 0 to n-1.
Compute two new variables curr0 and curr1 as follows.
curr0 is the maximum of (prev0 + a[i]) and (prev1 – a[i])
curr1 is the maximum of (prev0 – a[i]) and (prev1 + a[i])
Update prev0 to curr0 and prev1 to curr1 for further iteration.
At last return final answer stored in prev0.
In this round, I was asked basic questions on system design. Then, I was asked my past internship experience on backend, followed by DSA questions.



If 'ARR' is [4,2,1,3] ,it can be splitted into two subsequences as [4,2,1] , [3] or [4,3],[2,1].
Count many subarrays twice. This can also be improved and the idea is based on fact that a sorted(decreasing) subarray of length ‘len’ adds len*(len-1)/2 to the result.



1. Journey means the order in which the cities will be visited.
2. The given tickets have at least one itinerary.
3. If multiple valid itineraries are possible, then return the itinerary that is a lexicographically smallest itinerary.
Build a map to store each departure location and its destinations array. Sort the destinations array. Now, we assume that the departure airport 'JFK' is the root node for this tree, and its destinations are the children. Since the destinations are sorted, the children are arranged alphabetically from left to right. For each destination, if it is also a departure airport, then its children are the related destinations. Hopefully, by now, you get an idea of the structure of the tree. Run a post-order traversal of the tree; as a result, 'JFK' now is the last airport visited, hence the Greedy part. Finally, we reverse the result as the return value.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?