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
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
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 }}
sk-g
/
Leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
Leetcode
/
python
/
Copy path
Directory actions
More options
More options
Directory actions
More options
More options
Latest commit
History
History
History
master
Breadcrumbs
Leetcode
/
python
/
Copy path
Top
Folders and files
Name
Name
Last commit message
Last commit date
parent directory
..
1. Two Sum.py
1. Two Sum.py
102. Binary Tree Level Order Traversal.py
102. Binary Tree Level Order Traversal.py
108. Convert Sorted Array to Binary Search Tree.py
108. Convert Sorted Array to Binary Search Tree.py
11. Container With Most Water.py
11. Container With Most Water.py
128.longest-consecutive-sequence.py
128.longest-consecutive-sequence.py
14. Longest Common Prefix.py
14. Longest Common Prefix.py
146. LRU Cache.py
146. LRU Cache.py
15. 3Sum.py
15. 3Sum.py
1520.maximum-number-of-non-overlapping-substrings.py
1520.maximum-number-of-non-overlapping-substrings.py
155.min-stack.py
155.min-stack.py
165. Compare Version Numbers.py
165. Compare Version Numbers.py
167.two-sum-ii-input-array-is-sorted.py
167.two-sum-ii-input-array-is-sorted.py
169. Majority Element.py
169. Majority Element.py
17. Letter Combinations of a Phone Number.py
17. Letter Combinations of a Phone Number.py
19. Remove Nth Node From End of List.py
19. Remove Nth Node From End of List.py
191. Number of 1 Bits.py
191. Number of 1 Bits.py
198. House Robber.py
198. House Robber.py
2. Add Two Numbers.py
2. Add Two Numbers.py
20. Valid Parentheses.py
20. Valid Parentheses.py
209. Minimum Size Subarray Sum.py
209. Minimum Size Subarray Sum.py
215. Kth Largest Element in an Array.py
215. Kth Largest Element in an Array.py
215.kth-largest-element-in-an-array.py
215.kth-largest-element-in-an-array.py
219. Contains Duplicate II.py
219. Contains Duplicate II.py
229. Majority Element II.py
229. Majority Element II.py
23.merge-k-sorted-lists.py
23.merge-k-sorted-lists.py
239. Sliding Window Maximum.py
239. Sliding Window Maximum.py
240. Search a 2D Matrix II.py
240. Search a 2D Matrix II.py
253. Meeting Rooms II.py
253. Meeting Rooms II.py
26. Remove Duplicates from Sorted Array.py
26. Remove Duplicates from Sorted Array.py
261. Graph Valid Tree.py
261. Graph Valid Tree.py
27. Remove Element.py
27. Remove Element.py
283. Move Zeroes.py
283. Move Zeroes.py
285. Inorder Successor in BST.py
285. Inorder Successor in BST.py
297.serialize-and-deserialize-binary-tree.py
297.serialize-and-deserialize-binary-tree.py
315.count-of-smaller-numbers-after-self.py
315.count-of-smaller-numbers-after-self.py
318. Maximum Product of Word Lengths.py
318. Maximum Product of Word Lengths.py
33. Search in Rotated Sorted Array.py
33. Search in Rotated Sorted Array.py
330.patching-array.py
330.patching-array.py
344. Reverse String.py
344. Reverse String.py
373. Find K Pairs with Smallest Sums.py
373. Find K Pairs with Smallest Sums.py
388. Longest Absolute File Path.py
388. Longest Absolute File Path.py
4. Median of Two Sorted Arrays.py
4. Median of Two Sorted Arrays.py
415. Add Strings.py
415. Add Strings.py
443. String Compression.py
443. String Compression.py
461. Hamming Distance.py
461. Hamming Distance.py
482. License Key Formatting.py
482. License Key Formatting.py
485. Max Consecutive Ones.py
485. Max Consecutive Ones.py
5.longest-palindromic-substring.py
5.longest-palindromic-substring.py
508.most-frequent-subtree-sum.py
508.most-frequent-subtree-sum.py
518.coin-change-2.py
518.coin-change-2.py
530. Minimum Absolute Difference in BST.py
530. Minimum Absolute Difference in BST.py
532.k-diff-pairs-in-an-array.py
532.k-diff-pairs-in-an-array.py
54. Spiral Matrix.py
54. Spiral Matrix.py
547.number-of-provinces.py
547.number-of-provinces.py
556. Next Greater Element III.py
556. Next Greater Element III.py
557. Reverse Words in a String III.py
557. Reverse Words in a String III.py
566. Reshape the Matrix.py
566. Reshape the Matrix.py
5865.First-Day-Where-You-Have-Been-in-All-the-Rooms.py
5865.First-Day-Where-You-Have-Been-in-All-the-Rooms.py
617. Merge Two Binary Trees.py
617. Merge Two Binary Trees.py
637. Average of Levels in Binary Tree.py
637. Average of Levels in Binary Tree.py
65. Valid Number.py
65. Valid Number.py
657. Judge Route Circle.py
657. Judge Route Circle.py
66. Plus One.py
66. Plus One.py
661.image-smoother.py
661.image-smoother.py
662.maximum-width-of-binary-tree.py
662.maximum-width-of-binary-tree.py
674. Longest Continuous Increasing Subsequence.py
674. Longest Continuous Increasing Subsequence.py
68. Text Justification.py
68. Text Justification.py
683. kEmptySlots.py
683. kEmptySlots.py
684.redundant-connection.py
684.redundant-connection.py
685.redundant-connection-ii.py
685.redundant-connection-ii.py
687. Longest Univalue Path.py
687. Longest Univalue Path.py
692. Top K Frequent Words.py
692. Top K Frequent Words.py
7. Reverse Integer.py
7. Reverse Integer.py
703. Kth Largest Element in a Stream.py
703. Kth Largest Element in a Stream.py
719. Find K-th Smallest Pair Distance.py
719. Find K-th Smallest Pair Distance.py
721.accounts-merge.py
721.accounts-merge.py
724. Find Pivot Index.py
724. Find Pivot Index.py
73. Set Matrix Zeroes.py
73. Set Matrix Zeroes.py
74. Search a 2D Matrix.py
74. Search a 2D Matrix.py
76. Minimum Window Substring.py
76. Minimum Window Substring.py
771. Jewels and Stones.py
771. Jewels and Stones.py
793. Preimage Size of Factorial Zeroes Function.py
793. Preimage Size of Factorial Zeroes Function.py
81. Search in Rotated Sorted Array II.py
81. Search in Rotated Sorted Array II.py
812. Largest Triangle Area.py
812. Largest Triangle Area.py
813. Largest Sum of Averages.py
813. Largest Sum of Averages.py
815. Bus Routes.py
815. Bus Routes.py
819. Most Common Word.py
819. Most Common Word.py
857. Minimum Cost to Hire K Workers.py
857. Minimum Cost to Hire K Workers.py
88. Merge Sorted Array.py
88. Merge Sorted Array.py
9. Palindrome Number.py
9. Palindrome Number.py
905. Sort Array By Parity.py
905. Sort Array By Parity.py
96. Unique Binary Search Trees.py
96. Unique Binary Search Trees.py
View all files
You can’t perform that action at this time.