討論串[閒聊] 每日leetcode
共 1548 篇文章
內容預覽:
2106. Maximum Fruits Harvested After at Most K Steps. 題目 :. 給一個2-D array : fruits , fruits是以fruits[i][0]遞增排序. 其中fruits[i][0]表示i水果的位置. fruits[i][1]表示i水
(還有1084個字)
內容預覽:
2200. Find All K-Distant Indices in an Array. nums裡與key值一樣的複數index j,找出所有index i |i-j|<=k 並排序輸出. public IList<int> FindKDistantIndices(int[] nums, int
(還有363個字)
內容預覽:
懶惰改了 好像很多redundancy. easy好難==. 一二三四五. def findKDistantIndices(self, nums: List[int], key: int, k: int) -> List[int]:. ans, i = [], 0. while i<len(nums
(還有134個字)
內容預覽:
本肥連寫個回文都寫一坨屎. 我有點焦慮了==. def kMirror(self, k: int, n: int) -> int:. def to_base_k(num, k):. if num == 0:. return "0". digits = []. while num > 0:. rema
(還有1080個字)
內容預覽:
現在真的是沒人在寫了喔. 哀 剩我還沒上岸了. easy還WA的人就這樣了. def divideString(self, s: str, k: int, fill: str) -> List[str]:. ans = []. i = 0. while i<len(s):. cur = "". fo
(還有76個字)