⭐Container With Most Water

Thoughts: 1st Attempt

15th June 2022

  • 0:00 I've never seen this question before, and the question has a tag β€œtrick”. It doesn't sound like one of those question I should spend more than 10 minutes on.

  • 11:00 I am able to do it on paper. But I'm not able to code it. This is not right. I'll give it a few more minutes.

  • 24:00 OK, I was able to code what I did on paper.

  • 25:00 I'll see the solution now.

  • 33:00 Watching this YouTube Video.

Brute Force: Not Accepted

Using two poiners

Time Complexity: O(n)O(n)​

Space Complexity: O(1)O(1)​

Last updated