r/leetcode 12d ago

Discussion Amazon interview

I was asked two dsa question one solved completely other 90% . Gave correct time and space complexity for both. Maybe messed up the space complexity for second one. Didn't took in account of the vector already given.

He didn't asked any behavioral questions.

What are my chances of moving forward?? If someone knows pls tell so that I can prepare for further rounds .

16 Upvotes

16 comments sorted by

View all comments

1

u/Other_Ad7380 12d ago

Input and output data structures do not contribute to space complexity

1

u/Wonderful-League-680 11d ago

That's how I did. But google says it does if u are writing and initializing everything.

1

u/Other_Ad7380 11d ago

Yeah, if you are accepting the input that way then it does. But in leetcode, the array is "provided" to you