题解 | #接雨水问题#C++ 解法,双指针,理解短边移动 class Solution { public: /** * max water * @param arr int整型vector the array * @return long长整型 */ long long maxWater(vector<int>& arr) { long long l = 0, r = arr.size() - 1, lMax = 0, rMax = 0, ans = 0; while (l <=...