Author: huafu

Given an integer x, return true if x is palindrome integer.An integer is a palindrome when it reads the same backward as forward. For example, 121 is palindrome while 123 is not. Example 1:Input: x = 121 Output: true Example 2:Input: x = -121 Output: false Explanation: From left to right, it reads -121. From right to left, it becomes 121-....

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0.Assume the environment does not allow you to store 64-bit integers (signed or unsigned). Example 1:Input: x = 123 Output: 321 Example 2:Input: x...

Given an array of integers nums, sort the array in ascending order. Example 1:Input: nums = [5,2,3,1] Output: [1,2,3,5] Example 2:Input: nums = [5,1,1,2,0,0] Output: [0,0,1,1,2,5]  Constraints:1 <= nums.length <= 5 * 104-5 * 104 <= nums[i] <= 5 * 104  https://www.jianshu.com/p/bbbab7fa77a2冒泡排序(Bubble Sort) pythonclass Solution:    def sortArray(self, nums: List[int]) -> List[int]:     ...