Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to search
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
AlanWei
/
LeetCode
Public
Notifications
You must be signed in to change notification settings
Fork
6
Star
8
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
master
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
109 Commits
109 Commits
1. Two Sum.js
1. Two Sum.js
10. Regular Expression Matching.js
10. Regular Expression Matching.js
100. Same Tree.js
100. Same Tree.js
101. Symmetric Tree.js
101. Symmetric Tree.js
102. Binary Tree Level Order Traversal.js
102. Binary Tree Level Order Traversal.js
103. Binary Tree Zigzag Level Order Traversal.js
103. Binary Tree Zigzag Level Order Traversal.js
104. Maximum Depth of Binary Tree.js
104. Maximum Depth of Binary Tree.js
105. Construct Binary Tree from Preorder and Inorder Traversal.js
105. Construct Binary Tree from Preorder and Inorder Traversal.js
11. Container With Most Water.js
11. Container With Most Water.js
110. Balanced Binary Tree.js
110. Balanced Binary Tree.js
12. Integer to Roman.js
12. Integer to Roman.js
120. Triangle.js
120. Triangle.js
121. Best Time to Buy and Sell Stock.js
121. Best Time to Buy and Sell Stock.js
127. Word Ladder.js
127. Word Ladder.js
13. Roman to Integer.js
13. Roman to Integer.js
130. Surrounded Regions.js
130. Surrounded Regions.js
131. Palindrome Partitioning.js
131. Palindrome Partitioning.js
134. Gas Station.js
134. Gas Station.js
136. Single Number.js
136. Single Number.js
138. Copy List with Random Pointer.js
138. Copy List with Random Pointer.js
139. Word Break.js
139. Word Break.js
141. Linked List Cycle.js
141. Linked List Cycle.js
146. LRU Cache.js
146. LRU Cache.js
148. Sort List.js
148. Sort List.js
1496. Path Crossing.js
1496. Path Crossing.js
1497. Check If Array Pairs Are Divisible by k.js
1497. Check If Array Pairs Are Divisible by k.js
15. 3Sum.js
15. 3Sum.js
150. Evaluate Reverse Polish Notation.js
150. Evaluate Reverse Polish Notation.js
152. Maximum Product Subarray.js
152. Maximum Product Subarray.js
155. Min Stack.js
155. Min Stack.js
162. Find Peak Element.js
162. Find Peak Element.js
169. Majority Element.js
169. Majority Element.js
17. Letter Combinations of a Phone Number.js
17. Letter Combinations of a Phone Number.js
179. Largest Number.js
179. Largest Number.js
18. 4Sum.js
18. 4Sum.js
189. Rotate Array.cs
189. Rotate Array.cs
19. Remove Nth Node From End of List.js
19. Remove Nth Node From End of List.js
190. Reverse Bits.cs
190. Reverse Bits.cs
191. Number of 1 Bits.js
191. Number of 1 Bits.js
198. House Robber.js
198. House Robber.js
2. Add Two Numbers.js
2. Add Two Numbers.js
20. Valid Parentheses.js
20. Valid Parentheses.js
200. Number of Islands.js
200. Number of Islands.js
206. Reverse Linked List.js
206. Reverse Linked List.js
207. Course Schedule.js
207. Course Schedule.js
208. Implement Trie (Prefix Tree).js
208. Implement Trie (Prefix Tree).js
21. Merge Two Sorted Lists.js
21. Merge Two Sorted Lists.js
213. House Robber II.js
213. House Robber II.js
215. Kth Largest Element in an Array.js
215. Kth Largest Element in an Array.js
217. Contains Duplicate.js
217. Contains Duplicate.js
22. Generate Parentheses.js
22. Generate Parentheses.js
226. Invert Binary Tree.js
226. Invert Binary Tree.js
23. Merge k Sorted Lists.js
23. Merge k Sorted Lists.js
230. Kth Smallest Element in a BST.js
230. Kth Smallest Element in a BST.js
231. Power of Two.js
231. Power of Two.js
236. Lowest Common Ancestor of a Binary Tree.js
236. Lowest Common Ancestor of a Binary Tree.js
238. Product of Array Except Self.js
238. Product of Array Except Self.js
240. Search a 2D Matrix II.js
240. Search a 2D Matrix II.js
242. Valid Anagram.js
242. Valid Anagram.js
257. Binary Tree Paths.js
257. Binary Tree Paths.js
258. Add Digits.js
258. Add Digits.js
263. Ugly Number.js
263. Ugly Number.js
268. Missing Number.js
268. Missing Number.js
278. First Bad Version.js
278. First Bad Version.js
279. Perfect Squares.js
279. Perfect Squares.js
28. Implement strStr().js
28. Implement strStr().js
283. Move Zeroes.js
283. Move Zeroes.js
287. Find the Duplicate Number.js
287. Find the Duplicate Number.js
289. Game of Life.js
289. Game of Life.js
292. Nim Game.js
292. Nim Game.js
3. Longest Substring Without Repeating Characters.js
3. Longest Substring Without Repeating Characters.js
300. Longest Increasing Subsequence.js
300. Longest Increasing Subsequence.js
303. Range Sum Query - Immutable.js
303. Range Sum Query - Immutable.js
309. Best Time to Buy and Sell Stock with Cooldown.js
309. Best Time to Buy and Sell Stock with Cooldown.js
31. Next Permutation.js
31. Next Permutation.js
32. Longest Valid Parentheses.js
32. Longest Valid Parentheses.js
33. Search in Rotated Sorted Array.js
33. Search in Rotated Sorted Array.js
338. Counting Bits.js
338. Counting Bits.js
34. Search for a Range.js
34. Search for a Range.js
344. Reverse String.js
344. Reverse String.js
347. Top K Frequent Elements.js
347. Top K Frequent Elements.js
36. Valid Sudoku.js
36. Valid Sudoku.js
371. Sum of Two Integers.js
371. Sum of Two Integers.js
380. Insert Delete GetRandom O(1).js
380. Insert Delete GetRandom O(1).js
381. Insert Delete GetRandom O(1) - Duplicates allowed.js
381. Insert Delete GetRandom O(1) - Duplicates allowed.js
389. Find the Difference.js
389. Find the Difference.js
39. Combination Sum.js
39. Combination Sum.js
394. Decode String.js
394. Decode String.js
4. Median of Two Sorted Arrays.js
4. Median of Two Sorted Arrays.js
406. Queue Reconstruction by Height.js
406. Queue Reconstruction by Height.js
412. Fizz Buzz.js
412. Fizz Buzz.js
416. Partition Equal Subset Sum.js
416. Partition Equal Subset Sum.js
437. Path Sum III.js
437. Path Sum III.js
438. Find All Anagrams in a String.js
438. Find All Anagrams in a String.js
448. Find All Numbers Disappeared in an Array.js
448. Find All Numbers Disappeared in an Array.js
455. Assign Cookies.js
455. Assign Cookies.js
46. Permutations.js
46. Permutations.js
461. Hamming Distance.js
461. Hamming Distance.js
463. Island Perimeter.js
463. Island Perimeter.js
476. Number Complement.js
476. Number Complement.js
View all files
Repository files navigation
README
More
items
LeetCode
LeetCode in JavaScript
About
No description, website, or topics provided.
Resources
Readme
Activity
Stars
8
stars
Watchers
1
watching
Forks
6
forks
Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.