#leetcode
Read more stories on Hashnode
Articles with this tag
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)...
Problem Link class Solution: def getPermutation(self, n: int, k: int) -> str: fact = [1] * (n+1) for i in range(2, n+1): ...