Skip to content

P-ppc/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

leetcode

All solutions will be accepted!

Algorithms

# Title Solution Difficulty
771 Jewels and Stones java/py/js Easy
657 Judge Route Circle java/py/js Easy
461 Hamming Distance java/py/js Easy
476 Number Complement java/py/js Easy
728 Self Dividing Numbers java/py/js Easy
804 Unique Morse Code Words java/py/js Easy
500 Keyboard Row java/py/js Easy
344 Reverse String java/py/js Easy
541 Reverse String II java/py/js Easy
292 Nim Game java/py/js Easy
557 Reverse Words In A String III java/py/js Easy
104 Maximum Depth Of Binary Tree java/py/js Easy
617 Merge Two Binary Trees java/py/js Easy
226 Invert Binary Tree java/py/js Easy
693 Binary Number With Alternating Bits java/py/js Easy
108 Convert Sorted Array To Binary Search Tree java/py/js Easy
109 Convert Sorted List To Binary Search Tree java/py/js Medium
561 Array Partition I java/py/js Easy
463 Island Perimeter java/py/js Easy
821 Shortest Distance To A Character java/py/js Easy
371 Sum Of Two Integers java/py/js Easy
171 Excel Sheet Column Number java/py/js Easy
168 Excel Sheet Column Title java/py/js Easy
12 Integer To Roman java/py/js Easy
13 Roman To Integer java/py/js Easy
155 Min Stack java/py/js Easy
232 Implement Queue Using Stacks java/py/js Easy
225 Implement Stack Using Queues java/py/js Easy
20 Valid Parentheses java/py/js Easy
485 Max Consecutive Ones java/py/js Easy
191 Number Of 1 Bits java/py/js Easy
258 Add Digits java/py/js Easy
520 Detect Capital java/py/js Easy
682 BaseBall Game java/py/js Easy
404 Sum Of Left Leaves java/py/js Easy
283 Move Zeroes java/py/js Easy
136 Single Number java/py/js Easy
137 Single Number II java/py/js Medium
260 Single Number III java/py/js Medium
1 Two Sum java/py/js Easy
167 Two Sum II Input Array Is Sorted java/py/js Easy
653 Two Sum IV Input Is A Bst java/py/js Easy
9 Palindrome Number java/py/js Easy
389 Find The Difference java/py/js Easy
94 Binary Tree Inorder Traversal java/py/js Medium
144 Binary Tree Preorder Traversal java/py/js Medium
145 Binary Tree Postorder Traversal java/py/js Hard
231 Power Of Two java/py/js Easy
326 Power Of Three java/py/js Easy
342 Power Of Four java/py/js Easy
38 Count And Say java/py/js Easy
383 Ransom Note java/py/js Easy
217 Contains Duplicate java/py/js Easy
219 Contains Duplicate II java/py/js Easy
27 Remove Element java/py/js Easy
100 Same Tree java/py/js Easy
832 Flipping An Image java/py/js Easy
345 Reverse Vowels Of A String java/py/js Easy
83 Remove Duplicates From Sorted List java/py/js Easy
82 Remove Duplicates From Sorted List II java/py/js Medium
811 Subdomain Visit Count java/py/js Easy
637 Average Of Levels In Binary Tree java/py/js Easy
118 Pascals Triangle java/py/js Easy
303 Range Sum Query Immutable java/py/js Easy
412 Fizz Buzz java/py/js Easy
257 Binary Tree Paths java/py/js Easy
496 Next Greater Element I java/py/js Easy
766 Toeplitz Matrix java/py/js Easy
669 Trim A Binary Search Tree java/py/js Easy
806 Number Of Lines To Write String java/py/js Easy
566 Reshape The Matrix java/py/js Easy
575 Distribute Candies java/py/js Easy
21 Merge Two Sorted Lists java/py/js Easy
88 Merge Sorted Array java/py/js Easy
530 Minimum Absolute Difference In Bst java/py/js Easy
119 Pascals Triangle II java/py/js Easy
690 Employee Importance java/py Easy
169 Majority Element java/py/js Easy
107 Binary Tree Level Order Traversal II java/py/js Easy
349 Intersection Of Two Arrays java/py/js Easy
350 Intersection Of Two Arrays II java/py/js Easy
268 Missing Number java/py/js Easy
788 Rotated Digits java/py/js Easy
695 Max Area Of Island java/py/js Easy
762 Prime Number Of Set Bits In Binary Representation java/py/js Easy
521 Longest Uncommon Subsequence I java/py/js Easy
812 Largest Triangle Area java/py/js Easy
606 Construct String From Binary Tree java/py/js Easy
202 Happy Number java/py/js Easy
563 Binary Tree Tilt java/py/js Easy
696 Count Binary Substrings java/py/js Easy
121 Best Time To Buy And Sell Stock java/py/js Easy
122 Best Time To Buy And Sell Stock II java/py/js Easy
714 Best Time To Buy And Sell Stock With Transaction Fee java/py/js Medium
599 Minimum Index Sum Of Two Lists java/py/js Easy
551 Student Attendance Record I java/py/js Easy
538 Convert Bst To Greater Tree java/py/js Easy
235 Lowest Common Ancestor Of A Binary Search Tree java/py/js Easy
697 Degree Of An Array java/py/js Easy
671 Second Minimum Node In A Binary Tree java/py/js Easy
242 Valid Anagram java/py/js Easy
784 Letter Case Permutation java/py/js Easy
453 Minimum Moves To Equal Array Elements java/py/js Easy
661 Image Smoother java/py/js Easy
598 Range Addition II java/py/js Easy
492 Construct The Rectangle java/py/js Easy
447 Number Of Boomerangs java/py/js Easy
824 Goat Latin java/py/js Easy
206 Reverse Linked List java/py/js Easy
92 Reverse Linked List II java/py/js Medium
733 Flood Fill java/py/js Easy
110 Balanced Binary Tree java/py/js Easy
70 Climbing Stairs java/py/js Easy
448 Find All Numbers Disappeared In An Array java/py/js Easy
409 Longest Palindrome java/py/js Easy
35 Search Insert Position java/py/js Easy
278 First Bad Version java/py/js Easy
101 Symmetric Tree java/py/js Easy
506 Relative Ranks java/py/js Easy
717 1 Bit and 2 Bit Characters java/py/js Easy
744 Find Smallest Letter Greater Than Target java/py/js Easy
203 Remove Linked List Elements java/py/js Easy
237 Delete Node In A Linked List java/py/js Easy
405 Convert A Number To Hexadecimal java/py/js Easy
796 Rotate String java/py/js Easy
844 Backspace String Compare java/py/js Easy
26 Remove Duplicates From Sorted Array java/py/js Easy
80 Remove Duplicates From Sorted Array II java/py/js Medium
112 Path Sum java/py/js Easy
113 Path Sum II java/py/js Medium
437 Path Sum III java/py/js Easy
263 Ugly Number java/py/js Easy
783 Minimum Distance Between Bst Nodes java/py/js Easy
747 Largest Number At Least Twice Of Others java/py/js Easy
455 assign cookies java/py/js Easy
415 Add Strings java/py/js Easy
66 Plus One java/py/js Easy
67 Add Binary java/py/js Easy
504 Base 7 java/py/js Easy
830 Positions Of Large Groups java/py/js Easy
572 Subtree Of Another Tree java/py/js Easy
819 Most Common Word java/py/js Easy
172 Factorial Trailing Zeroes java/py/js Easy
290 Word Pattern java/py/js Easy
205 Isomorphic Strings java/py/js Easy
125 Valid Palindrome java/py/js Easy
680 Valid Palindrome II java/py/js Easy
141 Linked List Cycle java/py/js Easy
142 Linked List Cycle II java/py/js Medium
387 First Unique Character In A String java/py/js Easy
628 Maximum Product Of Three Numbers java/py/js Easy
724 Find Pivot Index java/py/js Easy
53 Maximum Subarray java/py/js Easy
543 Diameter Of Binary java/py/js Easy
746 Min Cost Climbing Stairs java/py/js Easy
198 House Robber java/py/js Easy
213 House Robber II java/py/js Medium
111 Minimum Depth Of Binary Tree java/py/js Easy
849 Maximize Distance To Closest Person java/py/js Easy
674 Longest Continuous Increasing Subsequence java/py/js Easy
234 Palindrome Linked List java/py/js Easy
414 Third Maximum Number java/py/js Easy
645 Set Mismatch java/py/js Easy
58 Length Of Last Word java/py/js Easy
14 Longest Common Prefix java/py/js Easy
594 Longest Harmonious Subsequence java/py/js Easy
374 Guess Number Higher Or Lower java/py Easy
852 Peak Index In A Mountain Array java/py/js Easy
441 Arranging Coins java/py/js Easy
69 Sqrtx java/py/js Easy
367 Valid Perfect Square java/py/js Easy
475 Heaters java/py/js Easy
501 Find Mode In Binary Search Tree java/py/js Easy
434 Number Of Segments In A String java/py/js Easy
190 Reverse Bits java/py/js Easy
400 Nth Digits java/py/js Easy
160 Intersection Of Two Linked Lists java/py/js Easy
860 LemonadeChange java/py/js Easy
401 Binary Watch java/py/js Easy
482 License Key Formatting java/py/js Easy
720 Longest Word In Dictionary java/py/js Easy
836 Rectangle Overlap java/py/js Easy
643 Maximum Average Subarray I java/py/js Easy
189 Rotate Array java/py/js Easy
61 Rotate List java/py/js Medium
687 Longest Univalue Path java/py/js Easy
28 Implement Strstr java/py/js Easy
459 Repeated Substring Pattern java/py/js Easy
581 Shortest Unsorted Continuous Subarray java/py/js Easy
443 String Compression java/py/js Easy
438 Find All Anagrams In A String java/py/js Easy
7 Reverse Integer java/py/js Easy
507 Perfect Number java/py/js Easy
840 Magic Squares In Grid java/py/js Easy
532 K Diff Pairs In An Array java/py/js Easy
633 Sum Of Square Numbers java/py/js Easy
605 Can Place Flowers java/py/js Easy
204 Count Primes java/py/js Easy
859 Buddy Strings java/py/js Easy
686 Repeated String Match java/py/js Easy
665 Non Decreasing Array java/py/js Easy
867 Transpose Matrix java/py/js Easy
479 Largest Palindrome Product java/py/js Easy
102 Binray Tree Level Order Traversal java/py/js Medium
22 Generate Parentheses java/py/js Medium
704 Binary Search java/py/js Easy
709 To Lower Case java/py/js Easy
700 Search In A Binary Search Tree java/py/js Easy
868 Binary Gap java/py/js Easy
559 Maximum Depth Of N Ary Tree java/py Easy
429 N Ary Tree Level Order Traversal java/py Easy
589 N Ary Tree Preorder Traversal java/py Easy
590 N Ary Tree Postorder Traversal java/py Easy
707 Design Linked List java/py/js Easy
622 Design Circular Queue java/py/js Easy
641 Design Circular Deque java/py/js Easy
705 Design Hashset java/py/js Easy
706 Design Hashmap java/py/js Easy
872 Leaf Similar Trees java/py/js Easy
427 Construct Quad Tree java/py Easy
458 Poor Pigs java/py/js Easy
558 Quad Tree Intersection java/py Easy
874 Walking Robot Simulation java/py/js Easy
876 Middle Of The Linked List java/py/js Easy
703 Kth Largest Element In A Stream java/py/js Easy
39 Combination Sum java/py/js Medium
40 Combination Sum II java/py/js Medium
216 Combination Sum III java/py/js Medium
46 Permutations java/py/js Medium
47 Permutations II java/py/js Medium
77 Combinations java/py/js Medium
78 Subsets java/py/js Medium
90 Subsets II java/py/js Medium
89 Gray Code java/py/js Medium
17 Letter Combinations Of A Phone Number java/py/js Medium
131 Palindrome Partitioning java/py/js Medium
60 Permutation Sequence java/py/js Medium
106 Construct Binary Tree From Inorder And Postorder Traversal java/py/js Medium
105 Construct Binary Tree From Preorder And Inorder Traversal java/py/js Medium
654 Maximum Binary Tree java/py/js Medium
208 Implement Trie Prefix Tree java/py/js Medium
114 Flatten Binary Tree To Linked List java/py/js Medium
284 Peeking Iterator java/py Medium
328 Odd Even Linked List java/py/js Medium
677 Map Sum Pairs java/py/js Medium
442 Find All Duplicates In An Array java/py/js Medium
64 Minimum Path Sum java/py/js Medium
535 Encode And Decode Tinyurl java/py/js Medium
540 Single Element In A Sorted Array java/py/js Medium
148 Sort List java/py/js Medium
24 Swap Nodes In Pairs java/py/js Medium
143 Reorder List java/py/js Medium
515 Find Largest Value In Each Tree Row java/py/js Medium
199 Binary Tree Right Side View java/py/js Medium
147 Insertion Sort List java/py/js Medium
495 Teemo Attacking java/py/js Medium
56 Merge Intervals java/py/js Medium
11 Container With Most Water java/py/js Medium
338 Counting Bits java/py/js Medium
287 Find The Duplicate Number java/py/js Medium
807 Max Increase To Keep City Skyline java/py/js Medium
54 Spiral Matrix java/py/js Medium
59 Spiral Matrix II java/py/js Medium
885 Spiral Matrix III java/py/js Medium
19 Remove Nth Node From End Of List java/py/js Medium
526 Beautiful Arrangement java/py/js Medium
814 Binary Tree Pruning java/py/js Medium
150 Evaluate Reverse Polish Notation java/py/js Medium
341 Flatten Nested List Iterator java/py/js Medium
856 Score Of Parentheses java/py/js Medium
725 Split Linked List In Parts java/py/js Medium
86 Partition List java/py/js Medium
2 Add Two Numbers java/py/js Medium
445 Add Two Numbers II java/py/js Medium
817 Linked List Components java/py/js Medium
430 Flatten A Multilevel Doubly Linked List java/py Medium
138 Copy List With Random Pointer java/py/js Medium
62 Unique Paths java/py/js Medium
63 Unique Paths II java/py/js Medium
162 Find Peak Element java/py/js Medium
200 Number Of Islands java/py/js Medium
223 Rectangle Area java/py/js Medium
419 Battleships In A Board java/py/js Medium
129 Sum Root To Leaf Numbers java/py/js Medium
537 Complex Number Multiplication java/py/js Medium
228 Summary Ranges java/py/js Medium
890 Find And Replace Pattern java/py/js Medium
48 Rotate Image java/py/js Medium
74 Search A 2d Matrix java/py/js Medium
153 Find Minimum In Rotated Sorted Array java/py/js Medium
34 Find First And Last Position Of Element In Sorted Array java/py/js Medium
75 Sort Colors java/py/js Medium
623 Add One Row To Tree java/py/js Medium
513 Find Bottom Left Tree Value java/py/js Medium
103 Binary Tree Zigzag Level Order Traversal java/py/js Medium
134 Gas Station java/py/js Medium
238 Product Of Array Except Self java/py/js Medium
896 Monotonic Array java/py/js Easy
739 Daily Temperatures java/py/js Medium
921 Minimum Add To Make Parentheses Valid java/py/js Medium
797 All Paths From Source To Target java/py/js Medium
789 Escape The Ghosts java/py/js Medium
701 Insert Into A Binary Search Tree java/py/js Medium
165 Compare Version Numbers java/py/js Medium
8 String To Integer Atoi java/py/js Medium
299 Bulls And Cows java/py/js Medium
394 Decode String java/py/js Medium
938 Range Sum Of Bst java/py/js Medium
71 Simplify Path java/py/js Medium
451 Sort Characters By Frequency java/py/js Medium
215 Kth Largest Element In An Array java/py/js Medium
347 Top K Frequent Elements java/py/js Medium
692 Top K Frequent Words java/py/js Medium

Database

# Title Solution Difficulty
596 Big Countries mysql Easy
182 Duplicate Emails mysql Easy
596 Classes More Than 5 Students mysql Easy
620 Not Boring Movies mysql Easy
196 Delete Duplicate Emails mysql Easy
627 Swap Salary mysql Easy
175 Combine Two Tables mysql Easy
183 Customers Who Never Order mysql Easy
197 Rising Temperature mysql Easy
181 Employees Earning More Than Their Managers mysql Easy
176 Second Highest Salary mysql Easy
626 Exchange Seats mysql Medium
178 Rank Scores mysql Medium
180 Consecutive Numbers mysql Medium
177 Nth Highest Salary mysql Medium
184 Department Highest Salary mysql Medium