Posts
My study journey
I post things that I learned
My study journey
Problem: Reverse integer
My solution:
class Solution(object): def reverse(self, x): """ :type x: int :rtype: int """ if x < 0: sign = "-" else: sign = "+"
-
Leetcode study day 1
Leetcode
·
Today, I have studied a leetcode problem
I found this solution was really helpful:
class Solution(object): def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ i = 0 while i < len(nums