チキンライス
親孝—行って何?って考—える でもそれを考—えようとすることがもう 親孝—行なのかもしれない 子供の頃 たまに家族で 外食 いつも頼んでいたのは チキンライス 豪華なもの頼めば二度とつれてきては もらえ—な—いよう—な気—がして 親に気を遣って いたあんな気持ち 今の子供に 理解—できるかな—? 今日は—クリスマス 街はにぎやか お祭り騒ぎ— 七面—鳥は やっぱり照れる— 俺は まだまだチキンライ ...
親孝—行って何?って考—える でもそれを考—えようとすることがもう 親孝—行なのかもしれない 子供の頃 たまに家族で 外食 いつも頼んでいたのは チキンライス 豪華なもの頼めば二度とつれてきては もらえ—な—いよう—な気—がして 親に気を遣って いたあんな気持ち 今の子供に 理解—できるかな—? 今日は—クリスマス 街はにぎやか お祭り騒ぎ— 七面—鳥は やっぱり照れる— 俺は まだまだチキンライ ...
Problem https://leetcode.com/problems/reverse-odd-levels-of-binary-tree Solution Time Complexity: O(len(tree)) Space Complexity: O(len(tree)) (The input and output generally do not count towards the s ...
Problem https://leetcode.com/problems/minimum-number-of-moves-to-seat-everyone Solution Time Complexity: O(len(seats) * log(len(seats))) Space Complexity: O(len(seats)) (The input and output generally ...
Problem https://leetcode.com/problems/max-chunks-to-make-sorted 把 arr 分成數個 chunk, [sorted(chunk) for chunk in chunks] == sorted(arr) Solution: PrefixMax and SuffixMin Arrays prefix := arr[0 : i] suffi ...
Problem https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop ∀ i in range(prices), If ∃ js = [j for j in range(i + 1, len(prices)) if (j > i and prices[j] <= prices[i])] ...
Problem https://leetcode.com/problems/construct-string-with-repeat-limit Solution Time Complexity: O(len(s)) Space Complexity: O(1) (The input and output generally do not count towards the space compl ...
Problem https://leetcode.com/problems/final-array-state-after-k-multiplication-operations-i Solution Time Complexity: O(len(nums)) + k * log(len(num))) Space Complexity: O(len(nums)) (The input and ou ...
Problem https://leetcode.com/problems/maximum-average-pass-ratio Solution: Priority Queue Priority Queue 裡面要放甚麼? the pass ratios the number of total students the gains in the pass ratio Code Time Comp ...
for i, (a, b, c) in enumerate(list_x)
Problem https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements Solution: Sorting Sort by Multiple Keys Time Complexity: O(len(nums) * log(len(nums))) Space Complexity: O(len(n ...