Amazon Interview Experience | Set 148
1. Incoming stream of characters () defines an onion of depth 1, (()) of 2. Find all onions with their in an incoming stream of characters. Discuss complexity.
Stream can be (()) () )) ((( (
2. Biggest challenge faced / where you innovated?
i. Demonstrate High Level Design
3. Parking Lot Problem A, B , C lots with different car sizes. Efficient way of allocating available slot.
A: Maintain linked list of available slots. Complexity discussion.
1. Matrix of 1s and 0s. 1s are sorted in beginning of each row. Findan efficient way of finding the row with maximum 0s in it.
A: Find row which has lowest sum. Complexity discussion.
e.g. 1 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0
2. How to find two sets(of size m,n) are dis-joint(have no elements common) efficiently
A: Use hash map. Complexity is O(n) in worst case.
Follow up Q: How are hash maps stored in memory?
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Hey geek! It’s time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!
Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsoft, TCS, Wipro, Google and many more!