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 }}
sk-ruban
/
leetcode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
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
main
Branches
Tags
Go to file
Code
Open more actions menu
Folders and files
Name
Name
Last commit message
Last commit date
Latest commit
History
250 Commits
250 Commits
.gitignore
.gitignore
0001 - Two Sum.py
0001 - Two Sum.py
0005 - Longest Palindromic Substring.py
0005 - Longest Palindromic Substring.py
0011 - Container With Most Water.py
0011 - Container With Most Water.py
0015 - 3Sum.py
0015 - 3Sum.py
0016 - 3Sum Closest.py
0016 - 3Sum Closest.py
0017 - Letter Combinations of a Phone Number.py
0017 - Letter Combinations of a Phone Number.py
0018 - 4Sum.py
0018 - 4Sum.py
0019 - Remove Nth Node From End of List.py
0019 - Remove Nth Node From End of List.py
0020 - Valid Parentheses.py
0020 - Valid Parentheses.py
0021 - Merge Two Sorted Lists.py
0021 - Merge Two Sorted Lists.py
0023 - Merge k Sorted Lists.py
0023 - Merge k Sorted Lists.py
0033 - Search in Rotated Sorted Array.py
0033 - Search in Rotated Sorted Array.py
0034 - Find First and Last Position of Element in Sorted Array.py
0034 - Find First and Last Position of Element in Sorted Array.py
0036 - Valid Sudoku.py
0036 - Valid Sudoku.py
0046 - Permutations.py
0046 - Permutations.py
0047 - Permutations II.py
0047 - Permutations II.py
0048 - Rotate Image.py
0048 - Rotate Image.py
0049 - Group Anagrams.py
0049 - Group Anagrams.py
0053 - Maximum Subarray.py
0053 - Maximum Subarray.py
0054 - Spiral Matrix.py
0054 - Spiral Matrix.py
0056 - Merge Intervals.py
0056 - Merge Intervals.py
0057 - Insert Interval.py
0057 - Insert Interval.py
0061 - Rotate List.py
0061 - Rotate List.py
0062 - Unique Paths.py
0062 - Unique Paths.py
0070 - Climbing Stairs.py
0070 - Climbing Stairs.py
0073 - Set Matrix Zeroes.py
0073 - Set Matrix Zeroes.py
0077 - Combinations.py
0077 - Combinations.py
0078 - Subsets.py
0078 - Subsets.py
0079 - Word Search.py
0079 - Word Search.py
0080 - Remove Duplicates from Sorted Array II.py
0080 - Remove Duplicates from Sorted Array II.py
0082 - Remove Duplicates from Sorted List II.py
0082 - Remove Duplicates from Sorted List II.py
0083 - Remove Duplicates from Sorted List.py
0083 - Remove Duplicates from Sorted List.py
0090 - Subsets II.py
0090 - Subsets II.py
0092 - Reverse Linked List II.py
0092 - Reverse Linked List II.py
0100 - Same Tree.py
0100 - Same Tree.py
0103 - Binary Tree Zigzag Level Order Traversal.py
0103 - Binary Tree Zigzag Level Order Traversal.py
0104 - Maximum Depth of Binary Tree.py
0104 - Maximum Depth of Binary Tree.py
0111 - Minimum Depth of Binary Tree.py
0111 - Minimum Depth of Binary Tree.py
0112 - Path Sum.py
0112 - Path Sum.py
0120 - Triangle.py
0120 - Triangle.py
0121 - Best Time to Buy and Sell Stock.py
0121 - Best Time to Buy and Sell Stock.py
0125 - Valid Palindrome.py
0125 - Valid Palindrome.py
0128 - Longest Consecutive Sequence.py
0128 - Longest Consecutive Sequence.py
0136 - Single Number.py
0136 - Single Number.py
0139 - Word Break.py
0139 - Word Break.py
0141 - Linked List Cycle.py
0141 - Linked List Cycle.py
0142 - Linked List Cycle II.py
0142 - Linked List Cycle II.py
0143 - Reorder List.py
0143 - Reorder List.py
0152 - Maximum Product Subarray.py
0152 - Maximum Product Subarray.py
0153 - Find Minimum in Rotated Sorted Array.py
0153 - Find Minimum in Rotated Sorted Array.py
0162 - Find Peak Element.py
0162 - Find Peak Element.py
0167 - Two Sum II.py
0167 - Two Sum II.py
0169 - Majority Element.py
0169 - Majority Element.py
0173 - Binary Search Tree Iterator.py
0173 - Binary Search Tree Iterator.py
0179 - Largest Number.py
0179 - Largest Number.py
0198 - House Robber.py
0198 - House Robber.py
0200 - Number of Islands.py
0200 - Number of Islands.py
0202 - Happy Number.py
0202 - Happy Number.py
0203 - Remove Linked List Elements.py
0203 - Remove Linked List Elements.py
0206 - Reverse Linked List.py
0206 - Reverse Linked List.py
0207 - Course Schedule.py
0207 - Course Schedule.py
0210 - Course Schedule II.py
0210 - Course Schedule II.py
0213 - House Robber II.py
0213 - House Robber II.py
0214 - Shortest Palindrome.py
0214 - Shortest Palindrome.py
0217 - Contains Duplicate.py
0217 - Contains Duplicate.py
0226 - Invert Binary Tree.py
0226 - Invert Binary Tree.py
0230 - Kth Smallest Element in a BST.py
0230 - Kth Smallest Element in a BST.py
0231 - Power of Two.py
0231 - Power of Two.py
0232 - Implement Queue using Stacks.py
0232 - Implement Queue using Stacks.py
0234 - Palindrome Linked List.py
0234 - Palindrome Linked List.py
0238 - Product of Array Except Self.py
0238 - Product of Array Except Self.py
0242 - Valid Anagram.py
0242 - Valid Anagram.py
0257 - Binary Tree Paths.py
0257 - Binary Tree Paths.py
0259 - 3Sum Smaller.py
0259 - 3Sum Smaller.py
0268 - Missing Number.py
0268 - Missing Number.py
0271 - Encode and Decode Strings.py
0271 - Encode and Decode Strings.py
0278 - First Bad Version.py
0278 - First Bad Version.py
0283 - Move Zeroes.py
0283 - Move Zeroes.py
0284 - Peeking Iterator.py
0284 - Peeking Iterator.py
0287 - Find the Duplicate Number.py
0287 - Find the Duplicate Number.py
0295 - Find Median from Data Stream.py
0295 - Find Median from Data Stream.py
0300 - Longest Increasing Subsequence.py
0300 - Longest Increasing Subsequence.py
0303 - Range Sum Query Immutable.py
0303 - Range Sum Query Immutable.py
0316 - Remove Duplicate Letters.py
0316 - Remove Duplicate Letters.py
0322 - Coin Change.py
0322 - Coin Change.py
0338 - Counting Bits.py
0338 - Counting Bits.py
0341 - Flatten Nested List Iterator.py
0341 - Flatten Nested List Iterator.py
0347 - Top K Frequent Elements.py
0347 - Top K Frequent Elements.py
0383 - Ransom Note.py
0383 - Ransom Note.py
0386 - Lexicographical Numbers.py
0386 - Lexicographical Numbers.py
0392 - Is Subsequence.py
0392 - Is Subsequence.py
0409 - Longest Palindrome.py
0409 - Longest Palindrome.py
0416 - Partition Equal Subset Sum.py
0416 - Partition Equal Subset Sum.py
0417 - Pacific Atlantic Water Flow.py
0417 - Pacific Atlantic Water Flow.py
0442 - Find All Duplicates in an Array.py
0442 - Find All Duplicates in an Array.py
0448 - Find All Numbers Disappeared in an Array.py
0448 - Find All Numbers Disappeared in an Array.py
0486 - Predict the Winner.py
0486 - Predict the Winner.py
0494 - Target Sum.py
0494 - Target Sum.py
0496 - Next Greater Element I.py
0496 - Next Greater Element I.py
View all files
About
Leetcode solutions in Python and SQL
leetcode.com/
Topics
leetcode
leetcode-python
leetcode-solutions
leetcode-sql
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.