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

  1. 寻找峰值 II
更多...

class  Solution
 

函数

 TEST (find_a_peak_element_ii, case1)
 
 TEST (find_a_peak_element_ii, case2)
 

详细描述

  1. 寻找峰值 II

函数说明

◆ TEST() [1/2]

leetcode::find_a_peak_element_ii::TEST ( find_a_peak_element_ii  ,
case1   
)

在文件 leetcode_test.cpp3521 行定义.

3521 {
3522 vector<vector<int>> mat = {{1, 4}, {3, 2}};
3523 const vector ans = {0, 1};
3524 ASSERT_EQ(Solution::findPeakGrid(mat), ans);
3525 }

引用了 leetcode::find_a_peak_element_ii::Solution::findPeakGrid().

◆ TEST() [2/2]

leetcode::find_a_peak_element_ii::TEST ( find_a_peak_element_ii  ,
case2   
)

在文件 leetcode_test.cpp3527 行定义.

3527 {
3528 vector<vector<int>> mat = {{10, 20, 15}, {21, 30, 14}, {7, 16, 32}};
3529 const vector ans = {2, 2};
3530 ASSERT_EQ(Solution::findPeakGrid(mat), ans);
3531 }

引用了 leetcode::find_a_peak_element_ii::Solution::findPeakGrid().