7. Reverse Integer
·
Algorithm
Reverse Integer - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. 내 풀이 class Solution: def reverse(self, x: int) -> int: x = int(str(x)[::-1]) if str(x)[-1] != "-" else int("-" + str(x)[::-1][:-1]) return x if abs(x) < 2 ** 31 else 0