Skip to content

thong3le/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Problem and Solutions

This is a summary of my solutions to the problems on LeetCode. The solution approaches of each problem are usually at the beginning of the source file. Please feel free to share any of your thoughts!

# Problems and Solutions
1 Two Sum [ python java cpp ]
7 Reverse Integer [ python java cpp ]
8 String to Integer (atoi) [ python java cpp ]
9 Palindrome Number [ python java cpp ]
10 Regular Expression Matching [ python java cpp ]
13 Roman to Integer [ python java cpp ]
14 Longest Common Prefix [ python java cpp ]
15 3Sum [ python java cpp ]
16 3Sum Closest [ python java cpp ]
18 4Sum [ python java cpp ]
19 Remove Nth Node From End of List [ python java cpp ]
20 Valid Parentheses [ python java cpp ]
21 Merge Two Sorted Lists [ python java cpp ]
22 Generate Parentheses [ python java cpp ]
26 Remove Duplicates from Sorted Array [ python java cpp ]
27 Remove Element [ python java cpp ]
28 Implement strStr() [ python java cpp ]
34 Search for a Range [ python java cpp ]
35 Search Insert Position [ python java cpp ]
36 Valid Sudoku [ python java cpp ]
38 Count and Say [ python java cpp ]
41 First Missing Positive [ python java cpp ]
49 Group Anagrams [ python java cpp ]
56 Merge Intervals [ python java cpp ]
58 Length of Last Word [ python java cpp ]
66 Plus One [ python java cpp ]
67 Add Binary [ python java cpp ]
69 Sqrt(x) [ python java cpp ]
70 Climbing Stairs [ python java cpp ]
71 Simplify Path [ python java cpp ]
74 Search a 2D Matrix [ python java cpp ]
79 Word Search [ python java cpp ]
83 Remove Duplicates from Sorted List [ python java cpp ]
84 Largest Rectangle in Histogram [ python java cpp ]
88 Merge Sorted Array [ python java cpp ]
91 Decode Ways [ python java cpp ]
94 Binary Tree Inorder Traversal [ python java cpp ]
98 Validate Binary Search Tree [ python java cpp ]
100 Same Tree [ python java cpp ]
101 Symmetric Tree [ python java cpp ]
102 Binary Tree Level Order Traversal [ python java cpp ]
104 Maximum Depth of Binary Tree [ python java cpp ]
106 Construct Binary Tree from Inorder and Postorder Traversal [ python java cpp ]
107 Binary Tree Level Order Traversal II [ python java cpp ]
110 Balanced Binary Tree [ python java cpp ]
111 Minimum Depth of Binary Tree [ python java cpp ]
112 Path Sum [ python java cpp ]
118 Pascal's Triangle [ python java cpp ]
119 Pascal's Triangle II [ python java cpp ]
121 Best Time to Buy and Sell Stock [ python java cpp ]
124 Binary Tree Maximum Path Sum [ python java cpp ]
125 Valid Palindrome [ python java cpp ]
133 Clone Graph [ python java cpp ]
136 Single Number [ python java cpp ]
139 Word Break [ python java cpp ]
140 Word Break II [ python java cpp ]
144 Binary Tree Preorder Traversal [ python java cpp ]
151 Reverse Words in a String [ python java cpp ]
152 Maximum Product Subarray [ python java cpp ]
155 Min Stack [ python java cpp ]
160 Intersection of Two Linked Lists [ python java cpp ]
165 Compare Version Numbers [ python java cpp ]
168 Excel Sheet Column Title [ python java cpp ]
169 Majority Element [ python java cpp ]
171 Excel Sheet Column Number [ python java cpp ]
172 Factorial Trailing Zeroes [ python java cpp ]
173 Binary Search Tree Iterator [ python java cpp ]
187 Repeated DNA Sequences [ python java cpp ]
189 Rotate Array [ python java cpp ]
190 Reverse Bits [ python java cpp ]
191 Number of 1 Bits [ python java cpp ]
198 House Robber [ python java cpp ]
199 Binary Tree Right Side View [ python java cpp ]
202 Happy Number [ python java cpp ]
204 Count Primes [ python java cpp ]
205 Isomorphic Strings [ python java cpp ]
206 Reverse Linked List [ python java cpp ]
212 Word Search II [ python java cpp ]
217 Contains Duplicate [ python java cpp ]
218 The Skyline Problem [ python java cpp ]
219 Contains Duplicate II [ python java cpp ]
220 Contains Duplicate III [ python java cpp ]
224 Basic Calculator [ python java cpp ]
225 Implement Stack using Queues [ python java cpp ]
226 Invert Binary Tree [ python java cpp ]
228 Summary Ranges [ python java cpp ]
231 Power of Two [ python java cpp ]
232 Implement Queue using Stacks [ python java cpp ]
234 Palindrome Linked List [ python java cpp ]
235 Lowest Common Ancestor of a Binary Search Tree [ python java cpp ]
237 Delete Node in a Linked List [ python java cpp ]
238 Product of Array Except Self [ python java cpp ]
240 Search a 2D Matrix II [ python java cpp ]
242 Valid Anagram [ python java cpp ]
257 Binary Tree Paths [ python java cpp ]
258 Add Digits [ python java cpp ]
263 Ugly Number [ python java cpp ]
278 First Bad Version [ python java cpp ]
283 Move Zeroes [ python java cpp ]
290 Word Pattern [ python java cpp ]
299 Bulls and Cows [ python java cpp ]
310 Minimum Height Trees [ python java cpp ]
334 Increasing Triplet Subsequence [ python java cpp ]
344 Reverse String [ python java cpp ]
349 Intersection of Two Arrays [ python java cpp ]
350 Intersection of Two Arrays II [ python java cpp ]
368 Largest Divisible Subset [ python java cpp ]
371 Sum of Two Integers [ python java cpp ]
378 Kth Smallest Element in a Sorted Matrix [ python java cpp ]
406 Queue Reconstruction by Height [ python java cpp ]
467 Unique Substrings in Wraparound String [ python java cpp ]
516 Longest Palindromic Subsequence [ python java cpp ]
530 Minimum Absolute Difference in BST [ python java cpp ]

About

Solution for problems in leetcode.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published