From b88fdf8cb8535b7a25aa6ed344939a90646d6526 Mon Sep 17 00:00:00 2001 From: Komal Vishwakarma <72248965+komi14@users.noreply.github.com> Date: Sat, 16 Oct 2021 01:38:26 +0530 Subject: [PATCH 1/5] Create 0009 --- 0009 | 1 + 1 file changed, 1 insertion(+) create mode 100644 0009 diff --git a/0009 b/0009 new file mode 100644 index 0000000..eb73f6d --- /dev/null +++ b/0009 @@ -0,0 +1 @@ +palindrome number Solution added. From 64b4345e44fa0c95939e95a5a29f266151297432 Mon Sep 17 00:00:00 2001 From: Komal Vishwakarma <72248965+komi14@users.noreply.github.com> Date: Sat, 16 Oct 2021 01:40:23 +0530 Subject: [PATCH 2/5] Delete 0009 --- 0009 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 0009 diff --git a/0009 b/0009 deleted file mode 100644 index eb73f6d..0000000 --- a/0009 +++ /dev/null @@ -1 +0,0 @@ -palindrome number Solution added. From aef41e933d9e2473aba9af8ae4a52dc81e8aa4cf Mon Sep 17 00:00:00 2001 From: Komal Vishwakarma <72248965+komi14@users.noreply.github.com> Date: Sat, 16 Oct 2021 01:51:25 +0530 Subject: [PATCH 3/5] Create palindrome number Solution --- 0009/palindrome number Solution | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 0009/palindrome number Solution diff --git a/0009/palindrome number Solution b/0009/palindrome number Solution new file mode 100644 index 0000000..78b3d5c --- /dev/null +++ b/0009/palindrome number Solution @@ -0,0 +1,4 @@ +class Solution: + def isPalindrome(self, x): + if str(x) == str(x)[::-1]: return True + return False From 6bf99b5257a82acac8e3d43ff773fbac7e7db73d Mon Sep 17 00:00:00 2001 From: Komal Vishwakarma <72248965+komi14@users.noreply.github.com> Date: Sat, 16 Oct 2021 01:57:09 +0530 Subject: [PATCH 4/5] Create README.md --- 0009/README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 0009/README.md diff --git a/0009/README.md b/0009/README.md new file mode 100644 index 0000000..cba8018 --- /dev/null +++ b/0009/README.md @@ -0,0 +1,35 @@ +#9 Palindrome Number + +Given an integer x, return true if x is palindrome integer. +An integer is a palindrome when it reads the same backward as forward. + +For example, 121 is palindrome while 123 is not. + +Example 1: + +Input: x = 121 +Output: true + +Example 2: + +Input: x = -121 +Output: false + +Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome. + +Example 3: + +Input: x = 10 +Output: false + +Explanation: Reads 01 from right to left. Therefore it is not a palindrome. + +Example 4: + +Input: x = -101 +Output: false + + +Constraints: + +-2^31 <= x <= 2^31 - 1 From 35d6ebf52f4ee988bc5177180105d7f580bd4d55 Mon Sep 17 00:00:00 2001 From: Pawan Jain <42181691+pawangeek@users.noreply.github.com> Date: Thu, 21 Oct 2021 10:46:18 +0530 Subject: [PATCH 5/5] Rename palindrome number Solution to solution.py --- 0009/{palindrome number Solution => solution.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 0009/{palindrome number Solution => solution.py} (100%) diff --git a/0009/palindrome number Solution b/0009/solution.py similarity index 100% rename from 0009/palindrome number Solution rename to 0009/solution.py