The DEFINITIVE way on how to LeetCode properly. (Hint: You are most likely doing it wrong!)

Today i had my Amazon interview round 2, he asked me K divisible pairs from leetcode, I tried to solve it two days ago and only 77 testcases were working for my solution, and I had fever, cold, and cough, I did not see the solution and today the same thing was asked in the interview, I was like damnnnn, I'm fuckeddddd. I told him an O(n2) solution and then got to O(n) and edge cases failed.

Then we went to the next problem and he asked me the greatest binary search tree in a binary tree. I told him an O(n2) solution, and there was no time and I could not solve it.

Lol, only if I had look into the discuss section on leetcode, I would have had chances of passing the interview today. Btw, OP, I'll follow your suggestions. Thanks!

/r/cscareerquestions Thread