diff --git a/#9/cpp/Solution.cpp b/#9/cpp/Solution.cpp new file mode 100644 index 0000000..f3aa3e1 --- /dev/null +++ b/#9/cpp/Solution.cpp @@ -0,0 +1,20 @@ +class Solution { +public: + bool isPalindrome(long long x) { + long long n = 0, temp = 0, org = x; + // cout<= 0) { + while(x != 0) { + temp = x%10; + n = n*10 + temp; + x /= 10; + // cout<