Last active
March 14, 2021 00:48
-
-
Save jbasinger/c5245eb8fcb7e9c05e4430a95d7aee22 to your computer and use it in GitHub Desktop.
LeetCode Problem 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void PalindromeInTheBeginning() | |
| { | |
| _sut.LongestPalindrome("babad").ShouldBe("bab"); | |
| } | |
| [Test] | |
| public void PalindromeInTheMiddle() | |
| { | |
| _sut.LongestPalindrome("cbbd").ShouldBe("bb"); | |
| } | |
| [Test] | |
| public void PalindromeAtTheEnd() | |
| { | |
| _sut.LongestPalindrome("asedad").ShouldBe("dad"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void PalindromeIsTheWholeString() | |
| { | |
| _sut.LongestPalindrome("racecar").ShouldBe("racecar"); | |
| } | |
| [Test] | |
| public void NoPalindromes() | |
| { | |
| _sut.LongestPalindrome("ab").ShouldBe("a"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment