LeetCode 筆記 - 29. Divide Two Integers Posted on 2022-06-12題目在此 29. Divide Two Integers請將兩個數字相除解題思維這題其實沒有太多事情可以做,注意一下 Overflow 就可以了程式碼12345678class Solution: def divide(self, dividend: int, divisor: int) -> int: result = int(dividend / divisor) if result > 2147483647: return 2147483647 return result也許你也會想看看LeetCode 筆記 - 1. Two SumLeetCode 筆記 - 2. Add Two NumbersLeetCode 筆記 - 217. Contains Duplicate