Comments
+8

When L increases, R is not monotonic, but when R increases, L is monotonic, so we can use two pointers.