Tip 1 : Daily Practice DSA for atleast 2 hours
Tip 2 : Keep Fundamental concepts strong and clear
Tip 3 : Do mock Interviews to get comfortable on it.
Tip 1 : Try to mentions self made good projects along with the coding platform handles, where you have done pretty well.
Tip 2 : Mentions some are the achievements, like good coding contest rank, hackathon participations, open source contributions.
Tip3 : Don't fake on the projects, it's a red flag.



I was aware of this type of problem, so solved it with the mentioned optimal solution in a first go.



You have a special type of car containing any number of seats.
Step1. Sort the trip based on start time and end time. Keep corresponding passengers for start and end in the sorted tuple
Step2. Keep 2 pointers s and e to keep track of start time and end time lists
Step3. Idea is if start_time[s] < end_time[e], you need to board new passengers. Subtract the capacity (capacity-passengers[start]). Increment start pointer
Step 4 . if start_time[s] < end_time[e], this means trip is over, so now the capacity has increased(capacity+passengers[end]). Increment end pointer


You can’t engage in multiple transactions simultaneously, i.e. you must sell the stock before rebuying it.
Input: N = 6 , PRICES = [3, 2, 6, 5, 0, 3] and K = 2.
Output: 7
Explanation : The optimal way to get maximum profit is to buy the stock on day 2(price = 2) and sell it on day 3(price = 6) and rebuy it on day 5(price = 0) and sell it on day 6(price = 3). The maximum profit will be (6 - 2) + (3 - 0) = 7.
Just maintain two pointers one for minimum price so far, and other to maintain max profit so far.
Code that i used.
int maxProfit(vector &prices) {
int maxPro = 0;
int minPrice = INT_MAX;
for(int i = 0; i < prices.size(); i++){
minPrice = min(minPrice, prices[i]);
maxPro = max(maxPro, prices[i] - minPrice);
}
return maxPro;
}
This round is to check leadership principals, and to get to know about some projects, and some basic CS fundamentals.
1. Where do you see yourself in next 5 years?
2. Why Amazon?

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?