I was asked two sum and solved in the most optimal way and the interviewers told me they had never seen that approach before. I end up getting rejected. Morons

Yep got this one as well. Thankfully I'd seen it during my review so was able to do it, but no way someone can just come up with a solution for something this hard optimally in that time. Amazon is crazy.

[удалено]

I was asked two sum and solved in the most optimal way and the interviewers told me they had never seen that approach before. I end up getting rejected. Morons

So if the target = arr[0] + arr[-1] how someone solve it in O(LogN)? If someone knows please let me know. I am really interested to know.

wym ? Isn't it just binary search variant ?

LC qn.2281, Sum of Total Strength of Wizards

Yep got this one as well. Thankfully I'd seen it during my review so was able to do it, but no way someone can just come up with a solution for something this hard optimally in that time. Amazon is crazy.

Did the brute force work?

What level job is this? Surprised they ask LC hard damn

Thats an absolutely brutal question. I dunno why Amazon asks that in a damn OA

Does any know where to learn questions from merging intervals? I got two questions, one was simple(easy) other was one was tough.

Is leetcode not sufficient for interval questions, they have a lot of them.

[удалено]

This is kinda similar to 875 Koko Eating Bananas

Start end end index of a number in a sorted list with many repeated numbers.

Sort the dictionary based on the value at the first index. dictionary= {'a': [2,4], 'b': [1,3], 'c': [4,7]}

python lambdas.

I remember one question in my Google interview being “what are you even trying to do here”

Did u get this in the MOCK interview?

Calender-1

Reverse a stack using recursion. Two operations - pop and insert called recursively in order to achieve this functionality.