15. 3Sum

1. class Solution: def twoSum(self, nums: List[int], l: int, r: int, target: int) -> List[List[int]]: ans = [] while l < r: if »

733. Flood Fill

class Solution: def divide(self, nums: List[int], l: int, r: int) -> int: target = nums[l] while l < r: while l < r »

912. Sort an Array

Quick Sort class Solution: def divide(self, nums: List[int], l: int, r: int) -> int: target = nums[l] while l < r: while l »

4. Median of Two Sorted Arrays

思路见:https://leetcode.com/articles/median-of-two-sorted-arrays/ class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: if len(nums2) < len(nums1) »