задача про палиндромы

This commit is contained in:
2026-03-22 22:21:16 +03:00
parent ec73b7d661
commit 6c9412cc14
2 changed files with 74 additions and 1 deletions

View File

@@ -1 +1,18 @@
Console.WriteLine("Hello, World!");
var sol = new Solution();
var cases = new (string input, string expected)[]
{
("babad", "bab"),
("cbbd", "bb"),
("a", "a"),
("ac", "a"),
("forgeeksskeegfor", "geeksskeeg"),
("abba", "abba"),
("racecar", "racecar")
};
foreach (var (input, expected) in cases)
{
var actual = sol.LongestPalindrome(input);
Console.WriteLine($"{input} -> {actual} (expected: {expected})");
}