What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-09-15 20:07:02
reads the string in then determines if the string is a palindrome.
#include <iostream> using namespace std; // Iterative function to check if given string is a palindrome or not bool isPalindrome(string str) { int low = 0; int high = str.length() - 1; &n... Add solution -
Other 2021-09-10 02:56:03
palindrom code for paython 5 charctart
string=input(("Enter a string:")) if(string==string[::-1]): print("The string is a palindrome") else: print("Not a palindrome") Add solution -
Javascript 2021-09-03 10:58:01
How do you detect whether or not a word is a palindrome in javascript
function palindrome(str) { // Step 1. The first part is the same as earlier var re = /[^A-Za-z0-9]/g; // or var re = /[\W_]/g; str = str.toLowerCase().replace(re, ''); // Step 2. Create the FOR loop var len = str.length; // var len = "A man, a ... Add solution