My solutions to some selected LeetCode problems.
Leetcode # | Description | Difficulty |
---|---|---|
1 | Two Sum | |
13 | Roman to Integer | |
15 | 3Sum | |
33 | Search in Rotated Sorted Array | |
34 | Find First and Last Position of Element in Sorted Array | |
35 | Search Insert Position | |
48 | Rotate Image | |
69 | Implement int sqrt(int x) | |
74 | Search in a 2D Matrix | |
75 | Sort Colors | |
82 | Remove Duplicates from Sorted List II | |
88 | Merge Sorted Array | |
94 | Binary Tree Inorder Traversal | |
121 | Best Time to Buy and Sell Stock | |
136 | Single Number | |
141 | Linked List Cycle | |
144 | Binary Tree Preorder Traversal | |
153 | Find Minimum in Rotated Sorted Array | |
160 | Intersection of Two Linked Lists | |
162 | Find Peak Element | |
167 | Two Sum II - Input array is sorted | |
175 | SQL - Combine Two Tables | |
176 | SQL - Second Highest Salary | |
177 | SQL - Nth Highest Salary | |
180 | SQL - Consecutive Numers | |
181 | SQL - Employees Earning More Than Their Managers | |
182 | SQL - Duplicate Emails | |
183 | SQL - Customers Who Never Order | |
184 | SQL - Department Highest Salary | |
185 | SQL - Department Top Three Salaries | |
189 | Rotate Array | |
196 | SQL - Delete Duplicate Emails | |
197 | SQL - Rising Temperature | |
206 | Reverse Linked List | |
215 | Kth Largest Element in an Array | |
241 | Different Ways to Add Parentheses | |
242 | Valid Anagram | |
260 | Single Number III | |
262 | SQL - Trips and Users | |
278 | First Bad Version | |
287 | Find the Duplicate Number | |
283 | Move Zeros | |
344 | Reverse String | |
347 | Top K Frequent Elements | |
378 | Kth Smallest Element in a Sorted Matrix | |
455 | Assign Cookies | |
504 | Base 7 | |
511 | SQL - Game Play Analysis I | |
512 | SQL - Game Play Analysis II | |
557 | Reverse words in a String III | |
577 | SQL - Employee Bonus | |
580 | SQL - Count Student Number in Departments | |
584 | SQL - Find Customer Referee | |
586 | SQL - Customer Placing the Largest Number of Orders | |
595 | SQL - Big Countries | |
597 | SQL - Friend Requests I: Overall Acceptance Rate | |
601 | SQL - Human Traffic Stadium | |
603 | SQL - Consecutive Available Seat | |
608 | SQL - Tree Node | |
613 | SQL - Shortest Distance in a Line | |
618 | SQL - Students Report By Geography | |
626 | SQL - Exchange Seats | |
627 | SQL - Swap Salary | |
704 | Binary Search | |
912 | Sort an Array | |
977 | Squares of a Sorted Array | |
1050 | SQL - Actors and Directors Who Coorperated At Least Three Times | |
1164 | SQL - Product Price At A Given Date | |
1158 | SQL - Market Analysis I | |
1159 | SQL - Market Analysis II | |
1204 | SQL - Last Person to fit in the Bus | |
1501 | SQL - Countries You Can Safely Invest In | |
1511 | SQL - Customer Order Frequency | |
1527 | SQL - Patients with a Condition | |
1532 | SQL - The Most Recent Three Orders | |
1965 | SQL - Employees With Missing Information |