Description:
The FunnyAlgorithms repository is a collection of simple and fun algorithm implementations in various programming languages.
To expand its usefulness and variety, we can add a new algorithm that checks whether a given string or number is a palindrome.
Proposed Solution
Create a new file named palindrome_checker. (e.g., palindrome_checker.py, palindrome_checker.js, or palindrome_checker.cpp).
Implement a simple function that:
Takes an input string or number.
Checks if it reads the same forward and backward.
Prints or returns a message like "Palindrome" or "Not a palindrome".
Add a short example or usage demonstration at the end of the file.
Update the README (if applicable) to list the new algorithm.
Description:
The FunnyAlgorithms repository is a collection of simple and fun algorithm implementations in various programming languages.
To expand its usefulness and variety, we can add a new algorithm that checks whether a given string or number is a palindrome.
Proposed Solution
Create a new file named palindrome_checker. (e.g., palindrome_checker.py, palindrome_checker.js, or palindrome_checker.cpp).
Implement a simple function that:
Takes an input string or number.
Checks if it reads the same forward and backward.
Prints or returns a message like "Palindrome" or "Not a palindrome".
Add a short example or usage demonstration at the end of the file.
Update the README (if applicable) to list the new algorithm.