목록Divide and Conquer (2)
취미가 좋다
https://leetcode.com/problems/search-a-2d-matrix-ii/ Search a 2D Matrix II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Solution class Solution: def searchMatrix(self, matrix, target): row, col = 0, len(matrix[0])-1 while row = 0: if matrix[row][col] < t..
https://leetcode.com/problems/kth-largest-element-in-an-array/ Kth Largest Element in an Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Solution import random class Solution: def findKthLargest(self, nums, k): k = len(nums) - k return self.quick(nums, k) def quick(self, nu..