problemscpp
A collection of my answers to algorithm problems in c++.
| 函数
leetcode::trapping_rain_water 命名空间参考

  1. 接雨水
更多...

class  Solution
 

函数

 TEST (trapping_rain_water, case1)
 
 TEST (trapping_rain_water, case2)
 

详细描述

  1. 接雨水

函数说明

◆ TEST() [1/2]

leetcode::trapping_rain_water::TEST ( trapping_rain_water  ,
case1   
)

在文件 leetcode_test.cpp3608 行定义.

3608 {
3609 vector height = {0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1};
3610 ASSERT_EQ(6, Solution::trap(height));
3611 }

引用了 leetcode::trapping_rain_water::Solution::trap().

◆ TEST() [2/2]

leetcode::trapping_rain_water::TEST ( trapping_rain_water  ,
case2   
)

在文件 leetcode_test.cpp3613 行定义.

3613 {
3614 vector height = {4, 2, 0, 3, 2, 5};
3615 ASSERT_EQ(9, Solution::trap(height));
3616 }

引用了 leetcode::trapping_rain_water::Solution::trap().