https://leetcode.com/problems/maximum-number-of-points-with-cost/ Coming up with o(n3) solution is not that hard but I had to spent 4 hours to come up with o(n2) solution. I think this problem should be classified as hard, and I don’t think anyone can solve this in 45 min without seeing it before. Or maybe I am dumb! #leetcode
This was asked by me at google solved within 10 min seriously i dint this it as hard the answer is obvious. May just solve some matrix dp
More practice 😊
I got the o(n**3) solution in 2 min and the o(n**2) in 5 min after. I was kind of expecting to have this kind of trick. You can get a hire rating with just an o(n**3) solution and using hints to get an o(n**2) could result in a strong hire, you are not expected to be flawless. Btw this question is now blacklisted from google.
ok you are genius!
Loool i did competitive programming and math olympid back in the day so I am used to seeing and expecting these kind of patterns. I guess thats what it is. But you dont need to knock the question out of the park to get a good rsting.