88. Merge Sorted Array Solution 1: Two Pointers class Solution: def merge(se...
思考與發呆的過程 Max Area of Island (medium)https://leetcode.com/problems/max-area-of-...
本人發呆寫程式的過程順便知道一件事情,聽音樂時還是不要開聲音,版權炮會讓影片消失很久XD喔對了附上確實有百天練習的圖。 Insert Delete GetR...
56. Merge Intervals Solution 1: Sort class Solution: def merge(self, interva...
94. Binary Tree Inorder Traversal Solution 1: Recursive class Solution: def...
189. Rotate Array Solution 1: Insert operation of the array (TLE) class Solution...
234. Palindrome Linked List Solution 1: Auxiliary array & reversed class Sol...
169. Majority Element Solution 1: Counter from collections import Counter class...
45. Jump Game II Solution 0: Brute-Force + DP (看完題目第一個想法) class Solution: de...
139. Word Break Solution 1: DFS (TLE) class Solution: def wordBreak(self, s:...
142. Linked List Cycle II Solution 1: HashSet class Solution: def detectCycl...
239. Sliding Window Maximum (Hard) Solution 1: Brute Force Time Complexity: O()...
34. Find First and Last Position of Element in Sorted Array Solution 1: Recursiv...
105. Construct Binary Tree from Preorder and Inorder Traversal Solution 1: Recur...
124. Binary Tree Maximum Path Sum Solution 1: DFS + Recursive # Definition for a...
98. Validate Binary Search Tree Solution 1: DFS class Solution: def _isValid...
141. Linked List Cycle Solution 1: Hash class Solution: def hasCycle(self, h...
283. Move Zeroes Solution 1: Two Pointers class Solution: def moveZeroes(sel...
41. First Missing Positive Solution 1: Sort class Solution: def firstMissing...
8. String to Integer (atoi) Solution 1: Brute-Force def myAtoi(self, s: str)...
215. Kth Largest Element in an Array Solution 1: Sort class Solution: def fi...
152. Maximum Product Subarray Solution 1: DP class Solution: def maxProduct(...
6. Zigzag Conversion Solution 1: 2D-Array + Simulation (模擬 Z 字形移動) class Solutio...
25. Reverse Nodes in k-Group Solution 1: Iterative class Solution: def rever...
236. Lowest Common Ancestor of a Binary Tree Solution 1: DFS class Solution:...
148. Sort List Solution 1: Merge Sort # Definition for singly-linked list. # cla...
96. Unique Binary Search Trees Solution 1: DP class Solution: def numTrees(s...
31. Next Permutation Solution 1: Two Pointer class Solution: ""&qu...
78. Subsets Solution 1: Bitwise class Solution(object): def subsets(self, nu...
200. Number of Islands Solution 1: DFS + Bitmap class Solution: def numIslan...