I had Amazon's Virtual onsite 3 days back which lasted for 4 hours
1st Interview(Senior SDE) :
Asked 3 behavioral questions and seemed okay with my answers
Asked a weird coding question, where he expected me to write a function for an API call to check 3 valid conditions for payment, wrote the functions with if loop as it was only 3, then he asked me what if it was 15 conditions, I said a for loop is what I will use to run over a dictionary of 15 conditions and return the corresponding error messages, here comes the weird part, he asked me how do I return a proper error without keeping these validation points in my code, I was like what?! so instinctively I said put it in a try-catch and respond with system generated error, he didn't look much happy about it. Am I missing anything in the question here?
2nd Interview(Lead SDE) :
A very warm interviewer, asked 3-4 behavioral questions then asked me a couple of questions on my past technical projects, and then we went to the coding question, a little tougher variant of
Solved it optimally. Overall a very good interview.
30 min break.
3rd Interview( Sr Manager and 1 more Sr Manager shadowing) :
Started by introducing themselves and their team, asked me a blend of behavioral and technical questions, seemed happy about all my answers. Then asked me a system design question on making a restaurant booking and review system application (something like Yelp) and asked me to design it, seemed happy with my answers, interrupted me once, and asked me to talk about in-depth code rather than just giving an overview of the design. Overall again I would say a very good interview
4th Interview(Lead SDE just turned Manager) :
A very warm interviewer, started with intros and asked me 2-3 big behavioral questions and then counterquestions on my decisions in my stories for the same questions, then we went on to the coding part, it was about purchases made after advertisement, was given two log lists and was supposed to give a count of purchases made by clicking each ad, started with a straight two-loop brute force solution, he asked me in between if I could decrease time complexity, I thought for a while and came up with a heap solution, he suggested use of a dictionary to even further drop time complexity and I could almost see my solution lying in the brute force code itself, he gave another hint and I understood, he asked me to verbally explain what I would do and it should be enough if its right, I explained he seemed convinced, overall a very good experience in this interview but I am not sure of the outcome because he needed to give me 2-3 hints.
What do you guys think, do I have a chance?
I am a CS master's graduate and have close to 1 year of experience and two internships prior to this interview and also hold an H1B.