The code I written is correct I think, does there any other problem here ?
All test cases wrong for Container Containing Most Water
My solution passing all test-cases on leetcode - https://leetcode.com/submissions/detail/479339676/
But not a single test case on CodingBlocks
If it is accepted by leetcode, then I think that there are some faulty test cases on hackerblocks. I will report this to the staff. Your code is right.