Skip to content

Luminoid/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

Solutions for LeetCode

Algorithms

# Title Solution Difficulty Topic Tag
1 Two Sum Python Easy Array
4 Median of Two Sorted Arrays Swift Hard Array Binary Search
11 Container With Most Water Swift Medium Array Greedy, Two Pointers
15 3Sum Swift, Python Medium Array Two pointers
31 Next Permutation Python Medium Array
42 Trapping Rain Water Python Hard Array
53 Maximum Subarray Python Medium Array Dynamic Programming
56 Merge Intervals Python Medium Array Sorting
84 Largest Rectangle in Histogram Swift Hard Array Monotonic Stack
121 Best Time to Buy and Sell Stock Python Easy Array Dynamic Programming
122 Best Time to Buy and Sell Stock II Swift Medium Array Greedy
123 Best Time to Buy and Sell Stock III Swift Hard Array
134 Gas Station Swift Medium Array Greedy
167 Two Sum II - Input Array Is Sorted Swift Medium Array Two Pointers
169 Majority Element Python Easy Array
200 Number of Islands Swift Medium Array Breadth-first search
217 Contains Duplicate Java Easy Array
221 Maximal Square Swift Medium Array Dynamic Programming
283 Move Zeroes Java Easy Array
322 Coin Change Swift Medium Array Dynamic Programming
349 Intersection of Two Arrays Swift Easy Array
350 Intersection of Two Arrays II Swift Easy Array
416 Partition Equal Subset Sum Python Medium Array Dynamic Programming
447 Number of Boomerangs Swift Medium Array
453 Minimum Moves to Equal Array Elements Swift Medium Array
455 Assign Cookies Swift Easy Array
463 Island Perimeter Swift Easy Array
500 Keyboard Row Swift Easy Array
518 Coin Change II Swift Medium Array Dynamic Programming, Knapsack
532 K-diff Pairs in an Array Python Medium Array
560 Subarray Sum Equals K Python Medium Array
561 Array Partition Swift Easy Array Greedy
739 Daily Temperatures Python Medium Array Stack
811 Subdomain Visit Count Python Medium Array
923 3Sum With Multiplicity Python Medium Array
1167 Minimum Cost to Connect Sticks Swift Medium Array Heap, Priority Queue
3 Longest Substring Without Repeating Characters Swift Medium String Sliding Window
5 Longest Palindromic Substring Python Medium String
13 Roman to Integer Python Easy String
14 Longest Common Prefix Python Easy String
20 Valid Parentheses Python Easy String Stack
22 Generate Parentheses Python Medium String
316 Remove Duplicate Letters Swift, Python Medium String Stack, Greedy
344 Reverse String Java Easy String
383 Ransom Note Java Easy String
387 First Unique Character in a String Swift Easy String
389 Find the Difference Swift Easy String
409 Longest Palindrome Swift Easy String
557 Reverse Words in a String III Swift Easy String
647 Palindromic Substrings Python Medium String
657 Robot Return to Origin Swift Easy String
1143 Longest Common Subsequence Python Medium String Dynamic Programming
1249 Minimum Remove to Make Valid Parentheses Python Medium String Stack
1668 Maximum Repeating Substring Python Easy String KMP
2 Add Two Numbers Python Medium Linked List
19 Remove Nth Node From End of List Swift Medium Linked List
141 Linked List Cycle Python Easy Linked List
142 Linked List Cycle II Python Medium Linked List
206 Reverse Linked List Java Easy Linked List
237 Delete Node in a Linked List Java Medium Linked List
146 LRU Cache Python Medium Hash Table
242 Valid Anagram Java Easy Hash Table
94 Binary Tree Inorder Traversal Swift Easy Tree Depth-first search
100 Same Tree Python Easy Tree
104 Maximum Depth of Binary Tree Python Easy Tree
144 Binary Tree Preorder Traversal Swift Easy Tree Depth-first search
145 Binary Tree Postorder Traversal Swift Easy Tree Depth-first search
226 Invert Binary Tree Java Easy Tree
404 Sum of Left Leaves Swift Easy Tree
617 Merge Two Binary Trees Swift Easy Tree
669 Trim a Binary Search Tree Swift Medium Tree Binary Search Tree
136 Single Number Python Easy Bit Manipulation
137 Single Number II Python Medium Bit Manipulation
401 Binary Watch Swift Easy Bit Manipulation
461 Hamming Distance Swift Easy Bit Manipulation
476 Number Complement Swift Easy Bit Manipulation
7 Reverse Integer Python Medium Math
171 Excel Sheet Column Number Python Easy Math
258 Add Digits Java Easy Math
292 Nim Game Java Easy Math
371 Sum of Two Integers Java Medium Math
412 FizzBuzz Java Easy Math
415 Add Strings Swift Easy Math
535 Encode and Decode TinyURL Swift Medium System Design

Database

# Title Solution Difficulty
175 Combine Two Tables SQL Easy
176 Second Highest Salary SQL Medium
177 Nth Highest Salary SQL Medium
178 Rank Scores SQL Medium
180 Consecutive Numbers SQL Medium
181 Employees Earning More Than Their Managers SQL Easy
182 Duplicate Emails SQL Easy
183 Customers Who Never Order SQL Easy
184 Department Highest Salary SQL Medium
185 Department Top Three Salaries SQL Hard
196 Delete Duplicate Emails SQL Easy
197 Rising Temperature SQL Easy
262 Trips and Users SQL Hard
595 Big Countries SQL Easy
596 Classes More Than 5 Students SQL Easy
601 Human Traffic of Stadium SQL Hard
620 Not Boring Movies SQL Easy
626 Exchange Seats SQL Medium
627 Swap Salary SQL Easy

Shell

# Title Solution Difficulty
192 Word Frequency Bash Medium
193 Valid Phone Numbers Bash Easy
194 Transpose File Bash Medium
195 Tenth Line Bash Easy

Concurrency

# Title Solution Difficulty
1114 Print in Order Python Easy
1195 Fizz Buzz Multithreaded Python Medium