Skip to content

Instantly share code, notes, and snippets.

@jbasinger
Last active March 14, 2021 00:48
Show Gist options
  • Select an option

  • Save jbasinger/c5245eb8fcb7e9c05e4430a95d7aee22 to your computer and use it in GitHub Desktop.

Select an option

Save jbasinger/c5245eb8fcb7e9c05e4430a95d7aee22 to your computer and use it in GitHub Desktop.
LeetCode Problem 5
[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");
}
[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