Skip to content

kenneth2001/LeetCode_Solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions

# Title Python C SQL Difficulty
1 Two Sum 1.py 1.c Easy
2 Add Two Numbers 2.py 2.c Medium
3 Longest Substring Without Repeating Characters 3.py Medium
4 Median of Two Sorted Arrays 4.py Hard
5 Longest Palindromic Substring 5.py Medium
6 Zigzag Conversion 6.py Medium
7 Reverse Integer 7.py Medium
8 String to Integer (atoi) 8.py Medium
9 Palindrome Number 9.py Easy
10 Regular Expression Matching 10.py Hard
11 Container With Most Water 11.py Medium
12 Integer to Roman 12.py Medium
13 Roman to Integer 13.py Easy
14 Longest Common Prefix 14.py Easy
15 3Sum 15.py Medium
16 3Sum Closest 16.py Medium
17 Letter Combinations of a Phone Number 17.py Medium
18 4Sum 18.py Medium
19 Remove Nth Node From End of List 19.py Medium
20 Valid Parentheses 20.py Easy
21 Merge Two Sorted Lists 21.py Easy
22 Generate Parentheses 22.py Medium
23 Merge k Sorted Lists 23.py Hard
24 Swap Nodes in Pairs 24.py Medium
25 Reverse Nodes in k-Group 25.py Hard
26 Remove Duplicates from Sorted Array 26.py Easy
27 Remove Element 27.py Easy
28 Find the Index of the First Occurrence in a String 28.py Easy
29 Divide Two Integers 29.py Medium
30 Substring with Concatenation of All Words 30.py Hard
31 Next Permutation 31.py Medium
32 Longest Valid Parentheses 32.py Hard
33 Search in Rotated Sorted Array 33.py Medium
34 Find First and Last Position of Element in Sorted Array 34.py Medium
35 Search Insert Position 35.py Easy
36 Valid Sudoku 36.py Medium
37 Sudoku Solver 37.py Hard
38 Count and Say 38.py Medium
39 Combination Sum 39.py Medium
40 Combination Sum II 40.py Medium
41 First Missing Positive 41.py Hard
42 Trapping Rain Water 42.py Hard
43 Multiply Strings 43.py Medium
44 Wildcard Matching 44.py Hard
45 Jump Game II 45.py Medium
46 Permutations 46.py Medium
47 Permutations II 47.py Medium
48 Rotate Image 48.py Medium
49 Group Anagrams 49.py Medium
50 Pow(x, n) 50.py Medium
53 Maximum Subarray 53.py Medium
54 Spiral Matrix 54.py Medium
55 Jump Game 55.py Medium
56 Merge Intervals 56.py Medium
57 Insert Interval 57.py Medium
58 Length of Last Word 58.py Easy
59 Spiral Matrix II 59.py Medium
60 Permutation Sequence 60.py Hard
61 Rotate List 61.py Medium
62 Unique Paths 62.py Medium
63 Unique Paths II 63.py Medium
64 Minimum Path Sum 64.py Medium
66 Plus One 66.py Easy
67 Add Binary 67.py Easy
69 Sqrt(x) 69.py Easy
70 Climbing Stairs 70.py Easy
71 Simplify Path 71.py Medium
73 Set Matrix Zeroes 73.py Medium
74 Search a 2D Matrix 74.py Medium
75 Sort Colors 75.py Medium
77 Combinations 77.py Medium
78 Subsets 78.py Medium
79 Word Search 79.py Medium
80 Remove Duplicates from Sorted Array II 80.py Medium
81 Search in Rotated Sorted Array II 81.py Medium
83 Remove Duplicates from Sorted List 83.py Easy
88 Merge Sorted Array 88.py Easy
94 Binary Tree Inorder Traversal 94.py Easy
100 Same Tree 100.py Easy
112 Path Sum 112.py Easy
116 Populating Next Right Pointers in Each Node 116.py Medium
118 Pascal's Triangle 118.py Easy
119 Pascal's Triangle II 119.py Easy
120 Triangle 120.py Medium
125 Valid Palindrome 125.py Easy
136 Single Number 136.py Easy
167 Two Sum II - Input Array Is Sorted 167.py Medium
169 Majority Element 169.py Easy
175 Combine Two Tables 175.sql Easy
176 Second Highest Salary 176.sql Medium
177 Nth Highest Salary 177.sql Medium
178 Rank Scores 178.sql Medium
180 Consecutive Numbers 180.sql Medium
181 Employees Earning More Than Their Managers 181.sql Easy
182 Duplicate Emails 182.sql Easy
183 Customers Who Never Order 183.sql Easy
184 Department Highest Salary 184.sql Medium
185 Department Top Three Salaries 185.sql Hard
189 Rotate Array 189.py Medium
190 Reverse Bits 190.py Easy
191 Number of 1 Bits 191.py Easy
196 Delete Duplicate Emails 196.sql Easy
197 Rising Temperature 197.sql Easy
198 House Robber 198.py Medium
206 Reverse Linked List 206.py Easy
231 Power of Two 231.py Easy
278 First Bad Version 278.py Easy
283 Move Zeroes 283.py Easy
344 Reverse String 344.py Easy
345 Reverse Vowels of a String 345.py Easy
511 Game Play Analysis I 511.sql Easy
542 01 Matrix 542.py Medium
550 Game Play Analysis IV 550.sql Medium
557 Reverse Words in a String III 557.py Easy
567 Permutation in String 567.py Medium
570 Managers with at Least 5 Direct Reports 570.sql Medium
577 Employee Bonus 577.sql Easy
584 Find Customer Referee 584.sql Easy
585 Investments in 2016 585.sql Medium
586 Customer Placing the Largest Number of Orders 586.sql Easy
595 Big Countries 595.sql Easy
596 Classes More Than 5 Students 596.sql Easy
602 Friend Requests II: Who Has the Most Friends 602.sql Medium
605 Can Place Flowers 605.py Easy
607 Sales Person 607.sql Easy
608 Tree Node 608.sql Medium
610 Triangle Judgement 610.sql Easy
617 Merge Two Binary Trees 617.py Easy
619 Biggest Single Number 619.sql Easy
620 Not Boring Movies 620.sql Easy
626 Exchange Seats 626.sql Medium
627 Swap Salary 627.sql Easy
695 Max Area of Island 695.py Medium
704 Binary Search 704.py Easy
733 Flood Fill 733.py Easy
784 Letter Case Permutation 784.py Medium
876 Middle of the Linked List 876.py Easy
977 Squares of a Sorted Array 977.py Easy
994 Rotting Oranges 994.py Medium
1045 Customers Who Bought All Products 1045.sql Medium
1050 Actors and Directors Who Cooperated At Least Three Times 1050.sql Easy
1068 Product Sales Analysis I 1068.sql Easy
1070 Product Sales Analysis III 1070.sql Medium
1071 Greatest Common Divisor of Strings 1071.py Easy
1075 Project Employees I 1075.sql Easy
1084 Sales Analysis III 1084.sql Easy
1141 User Activity for the Past 30 Days I 1141.sql Easy
1148 Article Views I 1148.sql Easy
1158 Market Analysis I 1158.sql Medium
1164 Product Price at a Given Date 1164.sql Medium
1174 Immediate Food Delivery II 1174.sql Medium
1179 Reformat Department Table 1179.sql Easy
1193 Monthly Transactions I 1193.sql Medium
1204 Last Person to Fit in the Bus 1204.sql Medium
1211 Queries Quality and Percentage 1211.sql Easy
1251 Average Selling Price 1251.sql Easy
1280 Students and Examinations 1280.sql Easy
1321 Restaurant Growth 1321.sql Medium
1327 List the Products Ordered in a Period 1327.sql Easy
1341 Movie Rating 1341.sql Medium
1378 Replace Employee ID With The Unique Identifier 1378.sql Easy
1393 Capital Gain/Loss 1393.sql Medium
1407 Top Travellers 1407.sql Easy
1431 Kids With the Greatest Number of Candies 1431.py Easy
1484 Group Sold Products By The Date 1484.sql Easy
1517 Find Users With Valid E-Mails 1517.sql Easy
1527 Patients With a Condition 1527.sql Easy
1581 Customer Who Visited but Did Not Make Any Transactions 1581.sql Easy
1587 Bank Account Summary II 1587.sql Easy
1633 Percentage of Users Attended a Contest 1633.sql Easy
1661 Average Time of Process per Machine 1661.sql Easy
1667 Fix Names in a Table 1667.sql Easy
1683 Invalid Tweets 1683.sql Easy
1693 Daily Leads and Partners 1693.sql Easy
1729 Find Followers Count 1729.sql Easy
1731 The Number of Employees Which Report to Each Employee 1731.sql Easy
1741 Find Total Time Spent by Each Employee 1741.sql Easy
1757 Recyclable and Low Fat Products 1757.sql Easy
1768 Merge Strings Alternately 1768.py Easy
1789 Primary Department for Each Employee 1789.sql Easy
1795 Rearrange Products Table 1795.sql Easy
1873 Calculate Special Bonus 1873.sql Easy
1890 The Latest Login in 2020 1890.sql Easy
1907 Count Salary Categories 1907.sql Medium
1934 Confirmation Rate 1934.sql Medium
1965 Employees With Missing Information 1965.sql Easy
1978 Employees Whose Manager Left the Company 1978.sql Easy
2356 Number of Unique Subjects Taught by Each Teacher 2356.sql Easy