Skip to content

Latest commit

 

History

History

leetcode

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Python3

Solved

# Problem Name Language Difficulty Speed
1 7 Reverse Integer Py3 Easy 0.2267
2 189 Rotate Array Py3 Easy 0.1094
3 2 Add Two Numbers Py3 Medium/C 1/1
4 1 Two Sum Py3/C Easy 0.1608/0.19
5 83 Remove Duplicates from Sorted List Py3/C Easy 0.8739/0.8179
6 771 Jewels and Stones Py3/C Easy 0.4648/1
7 26 Remove Duplicates from Sorted Array(*) Py3 Easy 0.8209
8 27 Remove Element Py3/C Easy 0.1740/1
9 88 Merge Sorted Array Py3 Easy 0.7637
10 442 Find All Duplicates in an Array Py3 Medium 0.349
11 4 Median of Two Sorted Arrays Py3 Hard 0.3578
12 868 Binary Gap Py3 Easy 0.9048
13 67 Add Binary Py3 Easy 0.3781
14 14 Longest Common Prefix Py3 Easy 0.9956
15 905 Sort Array By Parity Py3 Easy 0.3232
16 21 Merge Two Sorted Lists(*) Py3 Easy 0.7724
17 704 Binary Search Py3 Easy 0.1760
18 35 Search Insert Position Py3 Easy 0.9817
19 74 Search a 2D Matrix Py3 Medium 0.1318
20 81 Search in Rotated Array II Py3 Medium 0.0412
21 153 Find Minimum in Rotated Sorted Array Py3 Medium 0.9942
22 58 Lenght of Last word Py3 Easy 0.9145
23 461 Hamming Distance C Easy 1
24 69 Sqrt(x) Py3 Easy 0.6799
25 125 Valid Palindrome Py3 Easy 0.6191
26 59 Spiral Matrix II Py3 Medium 0.5028
27 54 Spiral Matrix Py3 Medium 0.1543
28 11 Container With Most Water Py3 Medium 0.8787
29 20 Valid Parentheses Py3 Easy 0.9854
30 50 Pow(x, n) Py3 Medium 0.213
31 414 Third Maximum Number Py3 Easy 0.2983
32 61 Rotate List Py3 Medium 0.5380
33 19 Remove Nth Node From End of List Py3 Medium 0.1827/0.8995
34 3 Longest Substring Without Repeating Characters Py3 Medium 0.4051
35 75 Sort Colors Py3 Medium 0.1378
36 33 Search in Rotated Sorted Array Py3 Medium 0.2542
37 80 Remove Duplicates from Sorted Array II Py3 Medium 0.2845
38 929 Unique Email Addresses Py3 Easy 0.2870
39 283 Move zeroes Py3 Easy 0.4571
40 565 Array Nesting Py3 Medium 0.2572
41 242 Valid Anagram Py3 Easy 0.1919
42 217 Contains Duplicate Py3 Easy 1
43 338 Counting Bits Py3 Medium 0.4007
44 206 Reverse Linked List Py3 Easy 0.3467
45 162 Find peek element Py3 Medium 0.0511
46 141 Linked List Cycle Py2 Easy 0.2705
47 142 Linked List Cycle II Py2 Medium 0.0454
48 648 Replace Words Py3 Medium 0.2234
50 387 First Unique Character in a String Py3 Easy 0.0589
51 389 Find the Difference Py3 Easy 0.5367
52 34 Find First and Last Position of Element in Sorted Array Py3 Medium 0.1919
53 867 Transpose Matrix Py3 Easy 0.4452
54 215 Kth Largest Element in an Array Py3 Medium 0.5213
55 239 Sliding Window Maximum Py3 Hard 0.0473
56 641 Design Circular Deque Py3 Medium 0.4143
57 622 Design Circular Queue Py3 Medium 0.6182
58 225 Implement Stack using Queues Py3 Easy 0.9965
59 232 Implement Queue using Stack Py3 Easy 1
60 9 Palindrome Py3 Easy 0.9833
61 709 To Lower Case Py3 Easy 0.9970
62 155 Min Stack Py3 Easy 0.0707
63 880 Decoded String at Index Py3 Easy 1
64 895 Maximum Frequency Stack Py3 Hard 0.0262
65 347 Top K Frequent Elements Py3 Medium 0.0542
66 981 Time Based Key-Value Store Py3 Medium 0.6052
67 451 Sort Characters By Frequency Py3 Medium 0.8439
68 219 Contains Duplicate II Py3 Easy 0.50
69 844 Backspace String Compare Py3 Easy 0.9888
70 190 Reverse Bits Py2 Easy 0.8878
71 136 Single Number Py3 Easy 0.0207
72 66 Plus One Py3 Easy 1
73 28 Implement strStr() Py3 Easy 1
74 287 Find the Duplicate Number Py3 Medium 1
75 204 Count Primes Py3 Easy 0.7273
76 240 Search a 2D Matrix Py3 Medium 0.9533
77 154 Find Minimum in Rotated Sorted Array II Py3 Hard 0.1478
78 390 Elimination Game Py3 Medium 0.4063*
79 445 Add Two Numbers II Py3 Medium 0.9661
80 234 Palindrome Linked List Py3 Medium 0.3671
81 48 Rotate Image Py3 Medium 0.4774
82 238 Product of Array Except Self Py3 Medium 0.4090
83 92 Reverse Linked List II Py3 Medium 0.1990
84 707 Design Linked List Py3 Easy 0.7312
85 104 Maximum Depth of Binary Tree Py3 Easy 0.3806
86 509 Fibonacci Number Py3 Easy 0.3345
87 46 Permutations Py3 Medium 0.8862
88 319 Bulb Switcher Py3 Medium 0.7059
89 160 Intersection of Two Linked Lists Py3 Easy 0.5014
90 24 Swap Nodes in Pairs Py3 Medium 0.7915
91 82 Remove Duplicates from Sorted List II Py3 Medium 0.7679
92 86 Partition List Py3 Medium 0.9679
93 203 Remove Linked List Elements Py3 Medium 0.7350
94 328 Odd Even Linked List Py3 Medium 0.8435
95 56 Merge Intervals Py3 Medium 0.4853
96 724 Find Pivot Index Py3 Easy 0.9986
97 228 Summary Ranges Py3 Medium 0.7119
98 112 Path Sum Py3 Easy 0.7906
99 113 Path Sum II Py3 Medium 0.8581
100 257 Binary Tree Paths Py3 Easy 0.9785
101 129 Sum Root to Leaf Numbers Py3 Medium 0.7659
102 18 4Sum Py3 Medium 0.1355
103 111 Minimum Depth of Binary Tree Py3 Easy 0.2434
104 102 Binary Tree Level Order Traversal Py3 Medium 0.7687
105 199 Binary Tree Right Side View Py3 Medium 0.9483
106 101 Symmetric Tree Py3 Easy 0.9986
107 144 Binary Tree Preorder Traversal Py3 Medium 0.8372
108 94 Binary Tree Inorder Traversal Py3 Medium 0.8516
109 145 Binary Tree Postorder Traversal Py3 Hard 0.3837/0.8507
110 229 Majority Element II Py3 Medium 0.5653
111 70 Climbing Stairs Py3 Easy 0.9817
112 226 Invert Binary Tree Py3 Easy 0.4499
113 700 Search in a Binary Search Tree Py3 Easy 0.9207
114 1008 Construct Binary Tree from Preorder Traversal Py3 Medium 0.3267
115 1302 Deepest Leaves Sum Py3 Medium 0.3548
116 121 Best Time to Buy and Sell Stock Py3 Easy 0.8774
117 122 Best Time to Buy and Sell Stock II Py3 Easy 0.8185
118 222 Count Complete Tree Nodes Py3 Medium 0.5040
119 100 Same Tree Py3 Easy 0.9222
120 71 Simplify Path Py3 Medium 0.4684
121 394 Decode String Py3 Medium 0.1849
122 110 Balanced Binary Tree Py3 Easy 0.0524
123 897 Increasing Order Search Tree Py3 Easy 0.8590
124 98 Validate Binary Search Tree Py3 Medium 0.0781(1st AC)
125 1464 Maximum Product of Two Elements in an Array Py3 Easy 0.3322(1st AC)
126 193 Valid Phone Numbers Py3 Easy (Permission Denied)
127 114 Flatten Binary Tree to Linked List Py3 Medium 0.9834(1st AC)
128 701 Insert into a Binary Search Tree Py3 Medium 0.2144(1st AC)
129 1344 Angle Between Hands of a Clock Py3 Medium 0.2136(1st AC)
130 1512 Number of Good Pairs Py3 Easy 1(1st AC)
131 654 Maximum Binary Tree Py3 Medium 0.1941(1st AC)
132 1513 Number of Substring With Only 1s Py3 Medium 0.5549(1st AC)