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

  1. 打开转盘锁
更多...

class  Solution
 

函数

 TEST (open_the_lock, case1)
 
 TEST (open_the_lock, case2)
 
 TEST (open_the_lock, case3)
 

详细描述

  1. 打开转盘锁

函数说明

◆ TEST() [1/3]

leetcode::open_the_lock::TEST ( open_the_lock  ,
case1   
)

在文件 leetcode_test.cpp3749 行定义.

3749 {
3750 vector<string> deadends = {"0201", "0101", "0102", "1212", "2002"};
3751 ASSERT_EQ(6, Solution::openLock(deadends, "0202"));
3752 }

引用了 leetcode::open_the_lock::Solution::openLock().

◆ TEST() [2/3]

leetcode::open_the_lock::TEST ( open_the_lock  ,
case2   
)

在文件 leetcode_test.cpp3754 行定义.

3754 {
3755 vector<string> deadends = {"8888"};
3756 ASSERT_EQ(1, Solution::openLock(deadends, "0009"));
3757 }

引用了 leetcode::open_the_lock::Solution::openLock().

◆ TEST() [3/3]

leetcode::open_the_lock::TEST ( open_the_lock  ,
case3   
)

在文件 leetcode_test.cpp3759 行定义.

3759 {
3760 vector<string> deadends = {"8887", "8889", "8878", "8898", "8788", "8988", "7888", "9888"};
3761 ASSERT_EQ(-1, Solution::openLock(deadends, "8888"));
3762 }

引用了 leetcode::open_the_lock::Solution::openLock().