fork download
  1. #include <iostream>
  2. using namespace std;
  3. // palindrone function
  4. class Solution {
  5. public:
  6. bool isPalindrome(string s) {
  7. int i;
  8. if (s[i] < 'A' || s[i] > 'Z' && s[i] < 'a'
  9. || s[i] > 'z') {
  10. // erase function to erase
  11. // the character
  12. s.erase(i, 1);
  13. i--;
  14. }
  15. }
  16.  
  17.  
  18.  
  19. };
  20.  
  21. int main() {
  22. // your code goes here
  23. Solution s1;
  24. bool Palindrome1=s1.isPalindrome("A man, a plan, a canal: Panama");
  25. cout<<Palindrome1;
  26. return 0;
  27. }
Runtime error #stdin #stdout 0.03s 5296KB
stdin
Standard input is empty
stdout
Standard output is empty