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

  1. 最大正方形
更多...

class  Solution
 

函数

 TEST (maximal_square, case1)
 
 TEST (maximal_square, case2)
 
 TEST (maximal_square, case3)
 

详细描述

  1. 最大正方形

函数说明

◆ TEST() [1/3]

leetcode::maximal_square::TEST ( maximal_square  ,
case1   
)

在文件 leetcode_test.cpp4043 行定义.

4043 {
4044 vector<vector<char>> matrix = {{'1', '0', '1', '0', '0'}, {'1', '0', '1', '1', '1'}, {'1', '1', '1', '1', '1'}, {'1', '0', '0', '1', '0'}};
4045 ASSERT_EQ(4, Solution::maximalSquare(matrix));
4046 }

引用了 leetcode::maximal_square::Solution::maximalSquare().

◆ TEST() [2/3]

leetcode::maximal_square::TEST ( maximal_square  ,
case2   
)

在文件 leetcode_test.cpp4048 行定义.

4048 {
4049 vector<vector<char>> matrix = {{'0', '1'}, {'1', '0'}};
4050 ASSERT_EQ(1, Solution::maximalSquare(matrix));
4051 }

引用了 leetcode::maximal_square::Solution::maximalSquare().

◆ TEST() [3/3]

leetcode::maximal_square::TEST ( maximal_square  ,
case3   
)

在文件 leetcode_test.cpp4053 行定义.

4053 {
4054 vector<vector<char>> matrix = {{'0'}};
4055 ASSERT_EQ(0, Solution::maximalSquare(matrix));
4056 }

引用了 leetcode::maximal_square::Solution::maximalSquare().