Complete solutions to LeetCode, LCOF and LCCI problems, updated daily. Please give me a star 🌟 if you like it.
- Netlify: https://lc.netlify.app
- Gitee Pages: https://doocs.gitee.io/leetcode
- GitHub Pages: https://doocs.github.io/leetcode
- Remove Duplicates from Sorted Array
- Remove Duplicates from Sorted Array II
- Remove Element
- Move Zeroes
- Rotate Array
- Spiral Matrix
- Two Sum
- 3Sum
- 4Sum
- 3Sum Smaller
- 3Sum Closest
- Merge Sorted Array
- Find Minimum in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array II
- Product of Array Except Self
- Longest Substring Without Repeating Characters
- Longest Common Prefix
- Reverse Vowels of a String
- String to Integer (atoi)
- Ransom Note
- Add Two Numbers
- Add Two Numbers II
- Delete Node in a Linked List
- Remove Duplicates from Sorted List
- Remove Duplicates from Sorted List II
- Remove Linked List Elements
- Kth Node From End of List
- Swap Nodes in Pairs
- Merge Two Sorted Lists
- Merge k Sorted Lists
- Insertion Sort List
- Sort List
- Reverse Linked List
- Reverse Linked List II
- Reorder List
- Rotate List
- Palindrome Linked List
- Intersection of Two Linked Lists
- Odd Even Linked List
- Linked List Cycle
- Linked List Cycle II
- Design Linked List
- Binary Tree Preorder Traversal
- Binary Tree Postorder Traversal
- Binary Tree Inorder Traversal
- Symmetric Tree
- Invert Binary Tree
- Binary Tree Level Order Traversal
- Binary Tree Level Order Traversal II
- Binary Tree Right Side View
- Maximum Depth of Binary Tree
- Minimum Depth of Binary Tree
- Binary Tree Paths
- Path Sum
- Path Sum II
- Construct Binary Tree from Preorder and Inorder Traversal
- Construct Binary Tree from Inorder and Postorder Traversal
- Binary Search Tree Iterator
- Lowest Common Ancestor of a Binary Tree
- Lowest Common Ancestor of a Binary Search Tree
- BiNode
- Convert Binary Search Tree to Sorted Doubly Linked List
- Boundary of Binary Tree
- Populating Next Right Pointers in Each Node
- Populating Next Right Pointers in Each Node II
- Integer to Roman
- Roman to Integer
- Single Number
- Single Number II
- Single Number III
- Set Mismatch
- Number of 1 Bits
- Count Primes
- Missing Number
- Valid Parentheses
- Min Stack
- Implement Queue using Stacks
- Implement Stack using Queues
- Evaluate Reverse Polish Notation
- Number of Recent Calls
- Daily Temperatures
- Basic Calculator II
- Next Greater Element I
- Next Greater Element II
- Climbing Stairs
- Trapping Rain Water
- Maximum Subarray
- Minimum Path Sum
- Decode Ways
- Maximum Product Subarray
- House Robber
- House Robber II
- Longest Increasing Subsequence
- Russian Doll Envelopes
- Longest Common Subsequence
- LRU Cache
- Implement Trie (Prefix Tree)
- Implement Trie II (Prefix Tree)
- Design Circular Queue
- Design Circular Deque
- Design HashSet
- Design HashMap
Yang Libin: Creator of @Doocs organization; member of @TheAlgorithms organization.
I'm looking for long-term contributors/partners to this repo! Send me PRs if you're interested! See the following:
- Fork this repository to your own GitHub account and then clone it to your local machine.
- Make some changes to your leetcode repository, then push the changes to your remote GitHub repository.
- Create a pull request with your changes!
- See CONTRIBUTING or GitHub Help for more details.
You can also contribute to doocs/leetcode using Gitpod.io, a free online dev environment with a single click.
This project exists thanks to all the people who contribute.
Thank you to all our backers and sponsors!
"You help the developer community practice for interviews, and there is nothing better we could ask for." -- Alan Yessenbayev
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.