Skip to content

Commit 7d0d7b7

Browse files
refactor 9
1 parent 2922a4b commit 7d0d7b7

File tree

1 file changed

+0
-16
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-16
lines changed

src/main/java/com/fishercoder/solutions/_9.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 9. Palindrome Number
5-
*
6-
* Determine whether an integer is a palindrome. Do this without extra space.
7-
*
8-
* Some hints:
9-
*
10-
* Could negative integers be palindromes? (ie, -1)
11-
*
12-
* If you are thinking of converting the integer to string, note the restriction of using extra space.
13-
*
14-
* You could also try reversing an integer. However, if you have solved the problem "Reverse Integer", you know that the reversed integer might overflow. How would you handle such case?
15-
*
16-
* There is a more generic way of solving this problem.
17-
*/
183
public class _9 {
19-
204
/**credit: https://discuss.leetcode.com/topic/8090/9-line-accepted-java-code-without-the-need-of-handling-overflow
215
* reversing only half and then compare if they're equal.*/
226
public static class Solution1 {

0 commit comments

Comments
 (0)