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

LeetCode 1791. Find Center of Star Graph 更多...

class  Solution
 

函数

 TEST (find_center_of_star_graph, case1)
 
 TEST (find_center_of_star_graph, case2)
 

详细描述

LeetCode 1791. Find Center of Star Graph

函数说明

◆ TEST() [1/2]

leetcode::find_center_of_star_graph::TEST ( find_center_of_star_graph  ,
case1   
)

在文件 leetcode_test.cpp1569 行定义.

1569 {
1570 vector<vector<int>> input = {{1, 2}, {2, 3}, {4, 2}};
1571 ASSERT_EQ(2, Solution::findCenter(input));
1572 }

引用了 leetcode::find_center_of_star_graph::Solution::findCenter().

◆ TEST() [2/2]

leetcode::find_center_of_star_graph::TEST ( find_center_of_star_graph  ,
case2   
)

在文件 leetcode_test.cpp1574 行定义.

1574 {
1575 vector<vector<int>> input = {{1, 2}, {5, 1}, {1, 3}, {1, 4}};
1576 ASSERT_EQ(1, Solution::findCenter(input));
1577 }

引用了 leetcode::find_center_of_star_graph::Solution::findCenter().