Problem Link class Solution: def findMedianSortedArrays(self, A: List[int], B: List[int]) -> float: if len(A) > len(B): return...
Problem Link class Solution: def maxNumber(self, nums1: List[int], nums2: List[int], k: int) -> List[int]: res = [] lower = max(0,...
Problem Link Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order. Example: Input: n = 32 Output:...
Problem Link Given an integer array nums and two integers k and t, return true if there are two distinct indices i and j in the array such that...
Problem Link Let dpVer[i][j] := the number of continuous 1’s from grid[0][j-1] to grid[i-1][j-1] Let dpHor[i][j] := the number of continuous 1’s from...
Problem Link dp[i][k] := largest average sum of nums[i:] with k partitions class Solution: def largestSumOfAverages(self, nums: List[int], k: int)...