Remove Duplicates from Sorted List (Python)
3Sum (Python)

Reverse Integer (Python)

kitt posted @ 2014年1月29日 18:32 in LeetCode , 1476 阅读
class Solution:
    # @return an integer
    def reverse(self, x):
        str_x = str(x)
        if str_x[0] == '-':
            return int('-' + str_x[-1:0:-1])
        else:
            return int(str_x[::-1])

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter