Tip 1 : Prepare all Topics from Coding Ninjas of Course Competitive Programming. Also, I practiced at least one question every day from sites like Leetcode, and Interviewbit and also took part in Codeforces Contest.
Tip 2 : Do Competitive Programming regularly.
Tip 1 : Keep your resume up to date and mention 2-3 good level projects which will give a good impression to the interviewer .
Tip 2 : Don't put false things on the resume.
I had to Implement an e-commerce platform application with following features
1. We would be able to onboard (add) users to the system
2. The application allows sellers to list products on the platform.
3. Users can either sell a product (Seller) or buy any listed product(Buyer).
4. Users(buyer) can select a product from multiple offered products using a selection strategy (You can assume buyer can only buy single quantity of a product at one time). Currently we have only two stratgies available;
-> One with best rating i.e. highest rating. If ratings are the same, then
choose the one with the lowest price.
-> One with lowest price i.e. lowest product price. If prices are the same,
then choose the one with the best rating.
5. List all products sold/bought by any user.
Bonus Feature
A buyer can cancel a specific product which he/she has purchased. Seller’s product quantity should increase after cancellation.



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
I solved using DP



1. Get(int num): If the key exists, it will return the value of the key stored. Else, return -1.
2. Put(int key, int value): If the key already exists, update the value of the key. Else add the key-value pair to the cache. If the number of keys is more than the capacity for this operation, delete the least recently key used.
For the following input:
4 2
2 1 4
1 1
1 4
We will initialize an empty LRU cache for the first operation with a maximum capacity of 2.
For the first operation, we need to add a key-value pair (1,4) to the cache.
For the second operation, we need to return the value stored for key 1, i.e., 4
For the third operation, we need to return -1, as we don't have any key 4 in the cache.
So, the final output will be:
4 -1
Who is your role model?
What is your expectation from this job?
Tip 1 : Maintain a positive attitude in all Interviews be it tech or HR.
Tip 2 : Develop team spirit and have some team work experience ( like ICPC times)
Tip 3 : Don't take HR round for granted, Prepare for this round beforehand.

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?