本題庫取自 CSDN (https://blog.csdn.net/fuxuemingzhu/article/details/119514856)
LeetCode Liked 數最多的 100 道題目,難度主要介於 Medium ~ Easy 之間。本系列用意為期許自己在工作之餘也別忘了練習基礎資料結構和演算法解題~
283. Move Zeroes Solution 1: Two Pointers class Solution: def moveZeroes(sel...
141. Linked List Cycle Solution 1: Hash class Solution: def hasCycle(self, h...
98. Validate Binary Search Tree Solution 1: DFS class Solution: def _isValid...
124. Binary Tree Maximum Path Sum Solution 1: DFS + Recursive # Definition for a...
105. Construct Binary Tree from Preorder and Inorder Traversal Solution 1: Recur...
34. Find First and Last Position of Element in Sorted Array Solution 1: Recursiv...
239. Sliding Window Maximum (Hard) Solution 1: Brute Force Time Complexity: O()...
142. Linked List Cycle II Solution 1: HashSet class Solution: def detectCycl...
139. Word Break Solution 1: DFS (TLE) class Solution: def wordBreak(self, s:...
45. Jump Game II Solution 0: Brute-Force + DP (看完題目第一個想法) class Solution: de...