LeetCode

1133. Largest Unique Number

1133. Largest Unique Number class Solution: def largestUniqueNumber(self, nums:

2225. Find Players With Zero or One Losses

2225. Find Players With Zero or One Losses class Solution:

2294. Partition Array Such That Maximum Difference Is K

2294. Partition Array Such That Maximum Difference Is K 這個題目屬於

2126. Destroying Asteroids

2126. Destroying Asteroids class Solution: def asteroidsDestroyed(self, mass: int,

901. Online Stock Span

901. Online Stock Span 這個題目真的算是非常難,沒有寫過的話面試真的很難有機會寫出來。 class StockSpanner: def __init_

739. Daily Temperatures

739. Daily Temperatures 這個題目是一個單調棧 Monotonic 的問題。 我在兩次不同時間用了兩個不同的方向來想這個題目。 從過去往未來實作 其實這應該是比較直覺的想法,但是我第一次做的時候反而沒有想到這個方法,

496. Next Greater Element I

496. Next Greater Element I 這一題是 Monotonic 的題目,但是他的變形其實滿難的,會建議先從

346. Moving Average from Data Stream

346. Moving Average from Data Stream class MovingAverage: def __init_

1544. Make The String Great

1544. Make The String Great class Solution: def makeGood(self,

71. Simplify Path

71. Simplify Path class Solution: def simplifyPath(self, path: str)