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

LeetCode 564. Find the Closest Palindrome 更多...

class  Solution
 

函数

 TEST (find_the_closest_palindrome, case1)
 
 TEST (find_the_closest_palindrome, case2)
 
 TEST (find_the_closest_palindrome, case3)
 
 TEST (find_the_closest_palindrome, case4)
 
 TEST (find_the_closest_palindrome, case5)
 
 TEST (find_the_closest_palindrome, case6)
 
 TEST (find_the_closest_palindrome, case7)
 
 TEST (find_the_closest_palindrome, case8)
 
 TEST (find_the_closest_palindrome, case9)
 

详细描述

LeetCode 564. Find the Closest Palindrome

函数说明

◆ TEST() [1/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case1   
)

在文件 leetcode_test.cpp1895 行定义.

1895 {
1896 ASSERT_EQ("121", Solution::nearestPalindromic("123"));
1897 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [2/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case2   
)

在文件 leetcode_test.cpp1899 行定义.

1899 {
1900 ASSERT_EQ("0", Solution::nearestPalindromic("1"));
1901 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [3/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case3   
)

在文件 leetcode_test.cpp1903 行定义.

1903 {
1904 ASSERT_EQ("1221", Solution::nearestPalindromic("1234"));
1905 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [4/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case4   
)

在文件 leetcode_test.cpp1907 行定义.

1907 {
1908 ASSERT_EQ("1001", Solution::nearestPalindromic("999"));
1909 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [5/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case5   
)

在文件 leetcode_test.cpp1911 行定义.

1911 {
1912 ASSERT_EQ("999", Solution::nearestPalindromic("1000"));
1913 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [6/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case6   
)

在文件 leetcode_test.cpp1915 行定义.

1915 {
1916 ASSERT_EQ("12921", Solution::nearestPalindromic("12932"));
1917 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [7/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case7   
)

在文件 leetcode_test.cpp1919 行定义.

1919 {
1920 ASSERT_EQ("99799", Solution::nearestPalindromic("99800"));
1921 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [8/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case8   
)

在文件 leetcode_test.cpp1923 行定义.

1923 {
1924 ASSERT_EQ("12121", Solution::nearestPalindromic("12120"));
1925 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().

◆ TEST() [9/9]

leetcode::find_the_closest_palindrome::TEST ( find_the_closest_palindrome  ,
case9   
)

在文件 leetcode_test.cpp1927 行定义.

1927 {
1928 ASSERT_EQ("1805115081", Solution::nearestPalindromic("1805170081"));
1929 }

引用了 leetcode::find_the_closest_palindrome::Solution::nearestPalindromic().