-
Notifications
You must be signed in to change notification settings - Fork 4
feat: add IsPalindrome snippet with unit test and README entry #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for taking the time to contribute👏 |
class IsPalindromeTest { | ||
|
||
@Test | ||
fun testPalindromeWithSimpleWord() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the rest of the codebase, please rename test functions using backticks and natural language descriptions (e.g., fun recognizes simple word palindrome
()). Here and in functions below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the feedback! 🙌
I’ll update the test function names to use backticks and natural language descriptions as suggested (e.g., fun recognizes simple word palindrome()), to keep it consistent with the rest of the codebase. Appreciate you pointing that out — will make the changes shortly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @tarun2684, looks really good!
Just one point - I think by mistake you have also commited entire /bin/
folder. Now, your Pull Request shows 25 changed files.
Description
This PR adds a new Kotlin snippet
IsPalindrome.kt
to thecodecollection.snippets.strings
package.The function checks whether a given string is a palindrome, ignoring punctuation and spacing.
Changes:
src/main/kotlin/codecollection/snippets/strings/IsPalindrome.kt
src/test/kotlin/codecollection/snippets/strings/IsPalindromeTest.kt
README.md
with an entry for the new snippetRelated Issue
Closes #18
Let me know if any further changes are needed!