8000 GitHub - 28youth/leetcode: Personal leetcode playground.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
forked from mutoe/leetcode

Personal leetcode playground.

Notifications You must be signed in to change notification settings

28youth/leetcode

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Leetcode solution

GitHub Workflow Status Codecov

Thanks for leetcode editor provide convenient learning tools.

Solutions

ID Title Time Space Ranking
1 two sum 4ms O(n) O(n) 95.58% 🟒
2 add two numbers 12ms O(n) O(n) 64.05% 🟠
3 longest substring without repeating characters 584ms O(n^2) O(n) 5.03% πŸ”΄
6 zigzag conversion 8ms O(n) O(n) 74.58% 🟠
7 reverse integer 0ms O(log(n)) O(1) 100% 🟒
8 string to integer atoi 4ms O(n) O(1) 47.51% πŸ”΄
11 container with most water 296ms O(n^2) O(1) 26.72% πŸ”΄
12 integer to roman 12ms O(log(n)) O(1) 44.82% πŸ”΄
20 valid parentheses 0ms O(n) O(n) 100% 🟒
21 merge two sorted lists 0ms O(n) O(1) 100% 🟒
35 search insert position 0ms O(log(n)) O(1) 100% 🟒
69 sqrtx 8ms O(log(n)) O(1) 19.58% πŸ”΄
75 sort colors 0ms O(n) O(1) 100% 🟒
83 remove duplicates from sorted list 0ms O(n) O(1) 100% 🟒
100 same tree 0ms O(n) O(1) 100% 🟒
101 symmetric tree 0ms O(n) O(1) 100% 🟒
102 binary tree level order traversal 0ms O(n) O(n) 100% 🟒
104 maximum depth of binary tree 4ms O(n) O(1) 90.15% 🟒
107 binary tree level order traversal ii 0ms O(n) O(n) 100% 🟒
108 convert sorted array to binary search tree 108ms O(n) O(n) 62.9% 🟠
111 minimum depth of binary tree 228ms O(n) O(n) 85.67% 🟠
112 path sum 4ms O(n) O(1) 96.52% 🟒
122 best time to buy and sell stock ii 4ms O(n) O(1) 94.38% 🟒
125 valid palindrome 0ms O(n*log(n)) O(1) 100% 🟒
141 linked list cycle 4ms O(n) O(1) 96% 🟒
155 min stack 12ms O(n) O(n) 98.73% 🟒
160 intersection of two linked lists 44ms O(n) O(n) 30.1% πŸ”΄
167 two sum ii input array is sorted 4ms O(n*log(n)) O(1) 94.87% 🟒
168 excel sheet column title 0ms O(log(n)) O(1) 100% 🟒
171 excel sheet column number 0ms O(n) O(1) 100% 🟒
193 valid phone numbers 0ms O(n) O(1) 100% 🟒
195 tenth line 0ms O(1) O(1) 100% 🟒
200 number of islands 0ms O(n*m) O(n) 100% 🟒
202 happy number 0ms O(1) O(1) 100% 🟒
203 remove linked list elements 8ms O(n) O(1) 88.89% 🟠
204 count primes 8ms O(n) O(n) 81.42% 🟠
206 reverse linked list 0ms O(n) O(1) 100% 🟒
215 kth largest element in an array 4ms O(n*log(n)) O(1) 98.66% 🟒
225 implement stack using queues 0ms O(n) O(n) 100% 🟒
226 invert binary tree 0ms O(n) O(1) 100% 🟒
231 power of two 0ms O(log(n)) O(1) 100% 🟒
232 implement queue using stacks 0ms O(n) O(1) 100% 🟒
235 lowest common ancestor of a binary search tree 20ms O(n) O(1) 80.11% 🟠
237 delete node in a linked list 0ms O(1) O(1) 100% 🟒
242 valid anagram 0ms O(n) O(1) 100% 🟒
258 add digits 0ms O(1) O(1) 100% 🟒
263 ugly number 0ms O(log(n)) O(1) 100% 🟒
278 first bad version 0ms O(log(n)) O(1) 100% 🟒
283 move zeroes 12ms O(n*log(n)) O(1) 6.22% πŸ”΄
326 power of three 8ms O(1) O(1) 99.32% 🟒
345 reverse vowels of a string 0ms O(n*log(n)) O(n) 100% 🟒
349 intersection of two arrays 0ms O(n) O(n) 100% 🟒
350 intersection of two arrays ii 4ms O(n) O(n) 79.29% 🟠
367 valid perfect square 0ms O(log(n)) O(1) 100% 🟒
374 guess number higher or lower 0ms O(log(n)) O(1) 100% 🟒
392 is subsequence 0ms O(n) O(1) 100% 🟒
404 sum of left leaves 0ms O(n) O(1) 100% 🟒
415 add strings 0ms O(n) O(n) 100% 🟒
441 arranging coins 8ms O(n) O(1) 38.46% πŸ”΄
468 validate ip address 0ms O(1) O(1) 100% 🟒
496 next greater element i 0ms O(n^2) O(n) 100% 🟒
501 find mode in binary search tree 12ms O(n) O(n) 51.16% 🟠
507 perfect number 0ms O(log(n)) O(1) 100% 🟒
530 minimum absolute difference in bst 12ms O(n) O(1) 72.92% 🟠
563 binary tree tilt 8ms O(n) O(1) 94.08% 🟒
572 subtree of another tree 20ms O(n^2) O(1) 47.97% πŸ”΄
617 merge two binary trees 28ms O(n) O(n) 87.26% 🟠
628 maximum product of three numbers 28ms O(n) O(1) 100% 🟒
637 average of levels in binary tree 8ms O(n) O(n) 89.47% 🟠
682 baseball game 0ms O(n) O(n) 100% 🟒
690 employee importance 12ms O(n) O(n) 100% 🟒
700 search in a binary search tree 24ms O(n) O(1) 84.67% 🟠
704 binary search 36ms O(log(n)) O(1) 67.19% 🟠
733 flood fill 4ms O(n^2) O(n) 99.07% 🟒
744 find smallest letter greater than target 0ms O(log(n)) O(1) 100% 🟒
844 backspace string compare 0ms O(n) O(1) 100% 🟒
852 peak index in a mountain array 0ms O(log(n)) O(1) 100% 🟒
875 koko eating bananas 48ms O(n*log(n)) O(1) 55.77% 🟠
876 middle of the linked list 0ms O(n) O(1) 100% 🟒
922 sort array by parity ii 16ms O(n) O(1) 98.46% 🟒
925 long pressed name 0ms O(n) O(1) 100% 🟒
933 number of recent calls 128ms O(n) O(n) 79.37% 🟠
976 largest perimeter triangle 32ms O(n*log(n)) O(1) 96.67% 🟒
1011 capacity to ship packages within d days 40ms O(n*log(n)) O(1) 41.46% πŸ”΄
1021 remove outermost parentheses 0ms O(n) O(n) 100% 🟒
1030 matrix cells in distance order 36ms O(n^2) O(n^2) 15.38% πŸ”΄
1047 remove all adjacent duplicates in string 4ms O(n) O(n) 87.67% 🟠
1122 relative sort array 0ms O(n^2) O(n) 100% 🟒
1290 convert binary number in a linked list to integer 0ms O(n) O(1) 100% 🟒
1337 the k weakest rows in a matrix 12ms O(n*m) O(n) 82.89% 🟠
1351 count negative numbers in a sorted matrix 8ms O(log(n)) O(1) 99.26% 🟒
1356 sort integers by the number of 1 bits 12ms O(n*log(n)) O(n) 13.46% πŸ”΄
1370 increasing decreasing string 0ms O(n) O(n) 100% 🟒
1403 minimum subsequence in non increasing order 4ms O(n*log(n)) O(n) 97.44% 🟒
1436 destination city 4ms O(n) O(n) 91.94% 🟒
1437 check if all 1s are at least length k places away 64ms O(n) O(1) 97.14% 🟒
1441 build an array with stack operations 0ms O(n) O(n) 100% 🟒
1491 average salary excluding the minimum and maximum salary 0ms O(n) O(1) 100% 🟒
1502 can make arithmetic progression from sequence 0ms O(n*log(n)) O(n) 100% 🟒
1528 shuffle string 4ms O(n) O(n) 87.5% 🟠
1544 make the string great 0ms O(n) O(n) 100% 🟒
1598 crawler log folder 0ms O(n) O(1) 100% 🟒
1640 check array formation through concatenation 0ms O(n) O(n) 100% 🟒
1672 richest customer wealth 0ms O(n^2) O(n) 100% 🟒
1673 find the most competitive subsequence 4072ms O(n^2) O(n) 7.14% πŸ”΄
1684 count the number of consistent strings 36ms O(n^2) O(n) 55.47% 🟠
1688 count of matches in tournament 0ms O(log(n)) O(1) 100% 🟒
1822 sign of the product of an array 4ms O(n) O(1) 96.21% 🟒
1827 minimum operations to make the array increasing 12ms O(n) O(1) 100% 🟒
1832 check if the sentence is pangram 0ms O(n) O(1) 100% 🟒

About

Personal leetcode playground.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0