diff options
Diffstat (limited to 'other/remove_palindromic_subsequence.cpp')
-rw-r--r-- | other/remove_palindromic_subsequence.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/other/remove_palindromic_subsequence.cpp b/other/remove_palindromic_subsequence.cpp deleted file mode 100644 index cbf7182..0000000 --- a/other/remove_palindromic_subsequence.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int removePalindromeSub(string s) { - if (s.size() == 0) - return 0; - for (int i = 0, j = s.size() - 1; i < j; i++, j--) - if (s[i] != s[j]) - return 2; - return 1; - } -}; - -int main() { - string s = "ababa"; - Solution obj; - cout << obj.removePalindromeSub(s); -} |