-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput.txt
executable file
·173 lines (173 loc) · 19.7 KB
/
output.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
| # | Title | Solution | Difficulty |
| ---- | ----- | -------- | ---------- |
| 1 | Two Sum | [Python3](./leetcode/1. Two Sum.py) | |
| 2 | Add Two Numbers | [Python3](./leetcode/2. Add Two Numbers.py) | |
| 5 | Longest Palindromic Substring | [Python3](./leetcode/5. Longest Palindromic Substring.py) | |
| 10 | Regular Expression Matching | [Python3](./leetcode/10. Regular Expression Matching.py) | |
| 11 | Container With Most Water | [Python3](./leetcode/11. Container With Most Water.py) | |
| 15 | 3Sum | [Python3](./leetcode/15. 3Sum.py) | |
| 17 | Letter Combinations of a Phone Number | [Python3](./leetcode/17. Letter Combinations of a Phone Number.py) | |
| 20 | Valid Parentheses | [Python3](./leetcode/20. Valid Parentheses.py) | |
| 22 | Generate Parentheses | [Python3](./leetcode/22. Generate Parentheses.py) | |
| 23 | Merge k Sorted Lists | [Python3](./leetcode/23. Merge k Sorted Lists.py) | |
| 24 | Swap Nodes in Pairs | [Python3](./leetcode/24. Swap Nodes in Pairs.py) | |
| 31 | Next Permutation | [Python3](./leetcode/31. Next Permutation.py) | |
| 32 | Longest Valid Parentheses | [Python3](./leetcode/32. Longest Valid Parentheses.py) | |
| 33 | Search in Rotated Sorted Array | [Python3](./leetcode/33. Search in Rotated Sorted Array.py) | |
| 34 | Find First and Last Position of Element in Sorted Array | [Python3](./leetcode/34. Find First and Last Position of Element in Sorted Array.py) | |
| 39 | Combination Sum | [Python3](./leetcode/39. Combination Sum.py) | |
| 40 | Combination Sum II | [Python3](./leetcode/40. Combination Sum II.py) | |
| 42 | Trapping Rain Water | [Python3](./leetcode/42. Trapping Rain Water.py) | |
| 44 | Wildcard Matching | [Python3](./leetcode/44. Wildcard Matching.py) | |
| 46 | Permutations | [Python3](./leetcode/46. Permutations.py) | |
| 47 | Permutations II | [Python3](./leetcode/47. Permutations II.py) | |
| 50 | Pow(x, n) | [Python3](./leetcode/50. Pow(x, n).py) | |
| 51 | N-Queens | [Python3](./leetcode/51. N-Queens.py) | |
| 56 | Merge Intervals | [Python3](./leetcode/56. Merge Intervals.py) | |
| 57 | Insert Interval | [Python3](./leetcode/57. Insert Interval.py) | |
| 71 | Simplify Path | [Python3](./leetcode/71. Simplify Path.py) | |
| 75 | Sort Colors | [Python3](./leetcode/75. Sort Colors.py) | |
| 78 | Subsets | [Python3](./leetcode/78. Subsets.py) | |
| 79 | Word Search | [Python3](./leetcode/79. Word Search.py) | |
| 84 | Largest Rectangle in Histogram | [Python3](./leetcode/84. Largest Rectangle in Histogram.py) | |
| 86 | Partition List | [Python3](./leetcode/86. Partition List.py) | |
| 90 | Subsets II | [Python3](./leetcode/90. Subsets II.py) | |
| 93 | Restore IP Addresses | [Python3](./leetcode/93. Restore IP Addresses.py) | |
| 94 | Binary Tree Inorder Traversal | [Python3](./leetcode/94. Binary Tree Inorder Traversal.py) | |
| 98 | Validate Binary Search Tree | [Python3](./leetcode/98. Validate Binary Search Tree.py) | |
| 100 | Same Tree | [Python3](./leetcode/100. Same Tree.py) | |
| 101 | Symmetric Tree | [Python3](./leetcode/101. Symmetric Tree.py) | |
| 102 | Binary Tree Level Order Traversal | [Python3](./leetcode/102. Binary Tree Level Order Traversal.py) | |
| 104 | Maximum Depth of Binary Tree | [Python3](./leetcode/104. Maximum Depth of Binary Tree.py) | |
| 109 | Convert Sorted List to Binary Search Tree | [Python3](./leetcode/109. Convert Sorted List to Binary Search Tree.py) | |
| 110 | Balanced Binary Tree | [Python3](./leetcode/110. Balanced Binary Tree.py) | |
| 111 | Minimum Depth of Binary Tree | [Python3](./leetcode/111. Minimum Depth of Binary Tree.py) | |
| 112 | Path Sum | [Python3](./leetcode/112. Path Sum.py) | |
| 113 | Path Sum II | [Python3](./leetcode/113. Path Sum II.py) | |
| 114 | Flatten Binary Tree to Linked List | [Python3](./leetcode/114. Flatten Binary Tree to Linked List.py) | |
| 116 | Populating Next Right Pointers in Each Node | [Python3](./leetcode/116. Populating Next Right Pointers in Each Node.py) | |
| 120 | Triangle | [Python3](./leetcode/120. Triangle.py) | |
| 121 | Best Time to Buy and Sell Stock | [Python3](./leetcode/121. Best Time to Buy and Sell Stock.py) | |
| 122 | Best Time to Buy and Sell Stock II | [Python3](./leetcode/122. Best Time to Buy and Sell Stock II.py) | |
| 123 | Best Time to Buy and Sell Stock III | [Python3](./leetcode/123. Best Time to Buy and Sell Stock III.py) | |
| 124 | Binary Tree Maximum Path Sum | [Python3](./leetcode/124. Binary Tree Maximum Path Sum.py) | |
| 125 | Valid Palindrome | [Python3](./leetcode/125. Valid Palindrome.py) | |
| 126 | Word Ladder II | [Python3](./leetcode/126. Word Ladder II.py) | |
| 129 | Sum Root to Leaf Numbers | [Python3](./leetcode/129. Sum Root to Leaf Numbers.py) | |
| 133 | Clone Graph | [Python3](./leetcode/133. Clone Graph.py) | |
| 139 | Word Break | [Python3](./leetcode/139. Word Break.py) | |
| 140 | Word Break II | [Python3](./leetcode/140. Word Break II.py) | |
| 144 | Binary Tree Preorder Traversal | [Python3](./leetcode/144. Binary Tree Preorder Traversal.py) | |
| 145 | Binary Tree Postorder Traversal | [Python3](./leetcode/145. Binary Tree Postorder Traversal.py) | |
| 146 | LRU Cache | [Python3](./leetcode/146. LRU Cache.py) | |
| 150 | Evaluate Reverse Polish Notation | [Python3](./leetcode/150. Evaluate Reverse Polish Notation.py) | |
| 153 | Find Minimum in Rotated Sorted Array | [Python3](./leetcode/153. Find Minimum in Rotated Sorted Array.py) | |
| 154 | Find Minimum in Rotated Sorted Array II | [Python3](./leetcode/154. Find Minimum in Rotated Sorted Array II.py) | |
| 155 | Min Stack | [Python3](./leetcode/155. Min Stack.py) | |
| 162 | Find Peak Element | [Python3](./leetcode/162. Find Peak Element.py) | |
| 173 | Binary Search Tree Iterator | [Python3](./leetcode/173. Binary Search Tree Iterator.py) | |
| 188 | Best Time to Buy and Sell Stock IV | [Python3](./leetcode/188. Best Time to Buy and Sell Stock IV.py) | |
| 207 | Course Schedule | [Python3](./leetcode/207. Course Schedule.py) | |
| 210 | Course Schedule II | [Python3](./leetcode/210. Course Schedule II.py) | |
| 215 | Kth Largest Element in an Array | [Python3](./leetcode/215. Kth Largest Element in an Array.py) | |
| 216 | Combination Sum III | [Python3](./leetcode/216. Combination Sum III.py) | |
| 225 | Implement Stack using Queues | [Python3](./leetcode/225. Implement Stack using Queues.py) | |
| 230 | Kth Smallest Element in a BST | [Python3](./leetcode/230. Kth Smallest Element in a BST.py) | |
| 232 | Implement Queue using Stacks | [Python3](./leetcode/232. Implement Queue using Stacks.py) | |
| 235 | Lowest Common Ancestor of a Binary Search Tree | [Python3](./leetcode/235. Lowest Common Ancestor of a Binary Search Tree.py) | |
| 236 | Lowest Common Ancestor of a Binary Tree | [Python3](./leetcode/236. Lowest Common Ancestor of a Binary Tree.py) | |
| 242 | Valid Anagram | [Python3](./leetcode/242. Valid Anagram.py) | |
| 252 | Meeting Rooms | [Python3](./leetcode/252. Meeting Rooms.py) | |
| 253 | Meeting Rooms II | [Python3](./leetcode/253. Meeting Rooms II.py) | |
| 257 | Binary Tree Paths | [Python3](./leetcode/257. Binary Tree Paths.py) | |
| 263 | Ugly Number | [Python3](./leetcode/263. Ugly Number.py) | |
| 264 | Ugly Number II | [Python3](./leetcode/264. Ugly Number II.py) | |
| 269 | Alien Dictionary | [Python3](./leetcode/269. Alien Dictionary.py) | |
| 270 | Closest Binary Search Tree Value | [Python3](./leetcode/270. Closest Binary Search Tree Value.py) | |
| 272 | Closest Binary Search Tree Value II | [Python3](./leetcode/272. Closest Binary Search Tree Value II.py) | |
| 278 | First Bad Version | [Python3](./leetcode/278. First Bad Version.py) | |
| 283 | Move Zeroes | [Python3](./leetcode/283. Move Zeroes.py) | |
| 285 | Inorder Successor in BST | [Python3](./leetcode/285. Inorder Successor in BST.py) | |
| 290 | Word Pattern | [Python3](./leetcode/290. Word Pattern.py) | |
| 298 | Binary Tree Longest Consecutive Sequence | [Python3](./leetcode/298. Binary Tree Longest Consecutive Sequence.py) | |
| 301 | Remove Invalid Parentheses | [Python3](./leetcode/301. Remove Invalid Parentheses.py) | |
| 302 | Smallest Rectangle Enclosing Black Pixels | [Python3](./leetcode/302. Smallest Rectangle Enclosing Black Pixels.py) | |
| 309 | Best Time to Buy and Sell Stock with Cooldown | [Python3](./leetcode/309. Best Time to Buy and Sell Stock with Cooldown.py) | |
| 313 | Super Ugly Number | [Python3](./leetcode/313. Super Ugly Number.py) | |
| 317 | Shortest Distance from All Buildings | [Python3](./leetcode/317. Shortest Distance from All Buildings.py) | |
| 322 | Coin Change | [Python3](./leetcode/322. Coin Change.py) | |
| 332 | Reconstruct Itinerary | [Python3](./leetcode/332. Reconstruct Itinerary.py) | |
| 333 | Largest BST Subtree | [Python3](./leetcode/333. Largest BST Subtree.py) | |
| 334 | Increasing Triplet Subsequence | [Python3](./leetcode/334. Increasing Triplet Subsequence.py) | |
| 341 | Flatten Nested List Iterator | [Python3](./leetcode/341. Flatten Nested List Iterator.py) | |
| 347 | Top K Frequent Elements | [Python3](./leetcode/347. Top K Frequent Elements.py) | |
| 353 | Design Snake Game | [Python3](./leetcode/353. Design Snake Game.py) | |
| 380 | Insert Delete GetRandom O(1) | [Python3](./leetcode/380. Insert Delete GetRandom O(1).py) | |
| 387 | First Unique Character in a String | [Python3](./leetcode/387. First Unique Character in a String.py) | |
| 394 | Decode String | [Python3](./leetcode/394. Decode String.py) | |
| 416 | Partition Equal Subset Sum | [Python3](./leetcode/416. Partition Equal Subset Sum.py) | |
| 417 | Pacific Atlantic Water Flow | [Python3](./leetcode/417. Pacific Atlantic Water Flow.py) | |
| 429 | N-ary Tree Level Order Traversal | [Python3](./leetcode/429. N-ary Tree Level Order Traversal.py) | |
| 430 | Flatten a Multilevel Doubly Linked List | [Python3](./leetcode/430. Flatten a Multilevel Doubly Linked List.py) | |
| 437 | Path Sum III | [Python3](./leetcode/437. Path Sum III.py) | |
| 444 | Sequence Reconstruction | [Python3](./leetcode/444. Sequence Reconstruction.py) | |
| 445 | Add Two Numbers II | [Python3](./leetcode/445. Add Two Numbers II.py) | |
| 451 | Sort Characters By Frequency | [Python3](./leetcode/451. Sort Characters By Frequency.py) | |
| 474 | Ones and Zeroes | [Python3](./leetcode/474. Ones and Zeroes.py) | |
| 486 | Predict the Winner | [Python3](./leetcode/486. Predict the Winner.py) | |
| 490 | The Maze | [Python3](./leetcode/490. The Maze.py) | |
| 494 | Target Sum | [Python3](./leetcode/494. Target Sum.py) | |
| 496 | Next Greater Element I | [Python3](./leetcode/496. Next Greater Element I.py) | |
| 498 | Diagonal Traverse | [Python3](./leetcode/498. Diagonal Traverse.py) | |
| 503 | Next Greater Element II | [Python3](./leetcode/503. Next Greater Element II.py) | |
| 505 | The Maze II | [Python3](./leetcode/505. The Maze II.py) | |
| 518 | Coin Change 2 | [Python3](./leetcode/518. Coin Change 2.py) | |
| 525 | Contiguous Array | [Python3](./leetcode/525. Contiguous Array.py) | |
| 549 | Binary Tree Longest Consecutive Sequence II | [Python3](./leetcode/549. Binary Tree Longest Consecutive Sequence II.py) | |
| 556 | Next Greater Element III | [Python3](./leetcode/556. Next Greater Element III.py) | |
| 567 | Permutation in String | [Python3](./leetcode/567. Permutation in String.py) | |
| 572 | Subtree of Another Tree | [Python3](./leetcode/572. Subtree of Another Tree.py) | |
| 582 | Kill Process | [Python3](./leetcode/582. Kill Process.py) | |
| 589 | N-ary Tree Preorder Traversal | [Python3](./leetcode/589. N-ary Tree Preorder Traversal.py) | |
| 590 | N-ary Tree Postorder Traversal | [Python3](./leetcode/590. N-ary Tree Postorder Traversal.py) | |
| 621 | Task Scheduler | [Python3](./leetcode/621. Task Scheduler.py) | |
| 622 | Design Circular Queue | [Python3](./leetcode/622. Design Circular Queue.py) | |
| 641 | Design Circular Deque | [Python3](./leetcode/641. Design Circular Deque.py) | |
| 658 | Find K Closest Elements | [Python3](./leetcode/658. Find K Closest Elements.py) | |
| 669 | Trim a Binary Search Tree | [Python3](./leetcode/669. Trim a Binary Search Tree.py) | |
| 687 | Longest Univalue Path | [Python3](./leetcode/687. Longest Univalue Path.py) | |
| 702 | Search in a Sorted Array of Unknown Size | [Python3](./leetcode/702. Search in a Sorted Array of Unknown Size.py) | |
| 703 | Kth Largest Element in a Stream | [Python3](./leetcode/703. Kth Largest Element in a Stream.py) | |
| 714 | Best Time to Buy and Sell Stock with Transaction Fee | [Python3](./leetcode/714. Best Time to Buy and Sell Stock with Transaction Fee.py) | |
| 735 | Asteroid Collision | [Python3](./leetcode/735. Asteroid Collision.py) | |
| 739 | Daily Temperatures | [Python3](./leetcode/739. Daily Temperatures.py) | |
| 743 | Network Delay Time | [Python3](./leetcode/743. Network Delay Time.py) | |
| 759 | Employee Free Time | [Python3](./leetcode/759. Employee Free Time.py) | |
| 785 | Is Graph Bipartite? | [Python3](./leetcode/785. Is Graph Bipartite?.py) | |
| 787 | Cheapest Flights Within K Stops | [Python3](./leetcode/787. Cheapest Flights Within K Stops.py) | |
| 814 | Binary Tree Pruning | [Python3](./leetcode/814. Binary Tree Pruning.py) | |
| 841 | Keys and Rooms | [Python3](./leetcode/841. Keys and Rooms.py) | |
| 852 | Peak Index in a Mountain Array | [Python3](./leetcode/852. Peak Index in a Mountain Array.py) | |
| 872 | Leaf-Similar Trees | [Python3](./leetcode/872. Leaf-Similar Trees.py) | |
| 876 | Middle of the Linked List | [Python3](./leetcode/876. Middle of the Linked List.py) | |
| 877 | Stone Game | [Python3](./leetcode/877. Stone Game.py) | |
| 901 | Online Stock Span | [Python3](./leetcode/901. Online Stock Span.py) | |
| 915 | Partition Array into Disjoint Intervals | [Python3](./leetcode/915. Partition Array into Disjoint Intervals.py) | |
| 965 | Univalued Binary Tree | [Python3](./leetcode/965. Univalued Binary Tree.py) | |
| 973 | K Closest Points to Origin | [Python3](./leetcode/973. K Closest Points to Origin.py) | |
| 986 | Interval List Intersections | [Python3](./leetcode/986. Interval List Intersections.py) | |
| 1013 | Partition Array Into Three Parts With Equal Sum | [Python3](./leetcode/1013. Partition Array Into Three Parts With Equal Sum.py) | |
| 1024 | Video Stitching | [Python3](./leetcode/1024. Video Stitching.py) | |
| 1029 | Two City Scheduling | [Python3](./leetcode/1029. Two City Scheduling.py) | |
| 1043 | Partition Array for Maximum Sum | [Python3](./leetcode/1043. Partition Array for Maximum Sum.py) | |
| 1053 | Previous Permutation With One Swap | [Python3](./leetcode/1053. Previous Permutation With One Swap.py) | |
| 1123 | Lowest Common Ancestor of Deepest Leaves | [Python3](./leetcode/1123. Lowest Common Ancestor of Deepest Leaves.py) | |
| 1169 | Invalid Transactions | [Python3](./leetcode/1169. Invalid Transactions.py) | |
| 1190 | Reverse Substrings Between Each Pair of Parentheses | [Python3](./leetcode/1190. Reverse Substrings Between Each Pair of Parentheses.py) | |
| 1209 | Remove All Adjacent Duplicates in String II | [Python3](./leetcode/1209. Remove All Adjacent Duplicates in String II.py) | |
| 1274 | Number of Ships in a Rectangle | [Python3](./leetcode/1274. Number of Ships in a Rectangle.py) | |
| 1302 | Deepest Leaves Sum | [Python3](./leetcode/1302. Deepest Leaves Sum.py) | |
| 1325 | Delete Leaves With a Given Value | [Python3](./leetcode/1325. Delete Leaves With a Given Value.py) | |
| 1329 | Sort the Matrix Diagonally | [Python3](./leetcode/1329. Sort the Matrix Diagonally.py) | |
| 1396 | Design Underground System | [Python3](./leetcode/1396. Design Underground System.py) | |
| 1462 | Course Schedule IV | [Python3](./leetcode/1462. Course Schedule IV.py) | |