René's URL Explorer Experiment


Title: GitHub - HughTang/Leetcode-Python

Open Graph Title: GitHub - HughTang/Leetcode-Python

X Title: GitHub - HughTang/Leetcode-Python

Description: Contribute to HughTang/Leetcode-Python development by creating an account on GitHub.

Open Graph Description: Contribute to HughTang/Leetcode-Python development by creating an account on GitHub.

X Description: Contribute to HughTang/Leetcode-Python development by creating an account on GitHub.

Opengraph URL: https://github.com/HughTang/Leetcode-Python

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:d60a4162-d476-4a53-576a-16c7a0b9b5b7
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-idAAF6:20D381:15188D7:1AFF1DC:697E03A9
html-safe-nonce873fb4cfcf6b60b023036f87fbd57e94966d2f6ee9c15722a60259f8a5929be4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUY2OjIwRDM4MToxNTE4OEQ3OjFBRkYxREM6Njk3RTAzQTkiLCJ2aXNpdG9yX2lkIjoiMjY1NTI2MjE0MTIyODkwOTQ4MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9635b4b22a50fd06d9e1fbc8713c0a2aa7f77679b79a38385d12fa100197ff0a
hovercard-subject-tagrepository:443463955
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/HughTang/Leetcode-Python
twitter:imagehttps://opengraph.githubassets.com/d8a762c742c24122245b48c82498160074db736611356a394f72f55a8b23686f/HughTang/Leetcode-Python
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d8a762c742c24122245b48c82498160074db736611356a394f72f55a8b23686f/HughTang/Leetcode-Python
og:image:altContribute to HughTang/Leetcode-Python development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6
turbo-cache-controlno-preview
go-importgithub.com/HughTang/Leetcode-Python git https://github.com/HughTang/Leetcode-Python.git
octolytics-dimension-user_id44694613
octolytics-dimension-user_loginHughTang
octolytics-dimension-repository_id443463955
octolytics-dimension-repository_nwoHughTang/Leetcode-Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id443463955
octolytics-dimension-repository_network_root_nwoHughTang/Leetcode-Python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7c85641c598ad130c74f7bcc27f58575cac69551
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/HughTang/Leetcode-Python#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FHughTang%2FLeetcode-Python
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FHughTang%2FLeetcode-Python
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=HughTang%2FLeetcode-Python
Reloadhttps://github.com/HughTang/Leetcode-Python
Reloadhttps://github.com/HughTang/Leetcode-Python
Reloadhttps://github.com/HughTang/Leetcode-Python
HughTang https://github.com/HughTang
Leetcode-Pythonhttps://github.com/HughTang/Leetcode-Python
Notifications https://github.com/login?return_to=%2FHughTang%2FLeetcode-Python
Fork 0 https://github.com/login?return_to=%2FHughTang%2FLeetcode-Python
Star 0 https://github.com/login?return_to=%2FHughTang%2FLeetcode-Python
0 stars https://github.com/HughTang/Leetcode-Python/stargazers
0 forks https://github.com/HughTang/Leetcode-Python/forks
Branches https://github.com/HughTang/Leetcode-Python/branches
Tags https://github.com/HughTang/Leetcode-Python/tags
Activity https://github.com/HughTang/Leetcode-Python/activity
Star https://github.com/login?return_to=%2FHughTang%2FLeetcode-Python
Notifications https://github.com/login?return_to=%2FHughTang%2FLeetcode-Python
Code https://github.com/HughTang/Leetcode-Python
Issues 0 https://github.com/HughTang/Leetcode-Python/issues
Pull requests 0 https://github.com/HughTang/Leetcode-Python/pulls
Actions https://github.com/HughTang/Leetcode-Python/actions
Projects 0 https://github.com/HughTang/Leetcode-Python/projects
Security 0 https://github.com/HughTang/Leetcode-Python/security
Insights https://github.com/HughTang/Leetcode-Python/pulse
Code https://github.com/HughTang/Leetcode-Python
Issues https://github.com/HughTang/Leetcode-Python/issues
Pull requests https://github.com/HughTang/Leetcode-Python/pulls
Actions https://github.com/HughTang/Leetcode-Python/actions
Projects https://github.com/HughTang/Leetcode-Python/projects
Security https://github.com/HughTang/Leetcode-Python/security
Insights https://github.com/HughTang/Leetcode-Python/pulse
Brancheshttps://github.com/HughTang/Leetcode-Python/branches
Tagshttps://github.com/HughTang/Leetcode-Python/tags
https://github.com/HughTang/Leetcode-Python/branches
https://github.com/HughTang/Leetcode-Python/tags
7 Commitshttps://github.com/HughTang/Leetcode-Python/commits/main/
https://github.com/HughTang/Leetcode-Python/commits/main/
Alibabahttps://github.com/HughTang/Leetcode-Python/tree/main/Alibaba
Alibabahttps://github.com/HughTang/Leetcode-Python/tree/main/Alibaba
Array and Matrixhttps://github.com/HughTang/Leetcode-Python/tree/main/Array%20and%20Matrix
Array and Matrixhttps://github.com/HughTang/Leetcode-Python/tree/main/Array%20and%20Matrix
Basic Applicationhttps://github.com/HughTang/Leetcode-Python/tree/main/Basic%20Application
Basic Applicationhttps://github.com/HughTang/Leetcode-Python/tree/main/Basic%20Application
Binary Searchhttps://github.com/HughTang/Leetcode-Python/tree/main/Binary%20Search
Binary Searchhttps://github.com/HughTang/Leetcode-Python/tree/main/Binary%20Search
Bit Manipulationhttps://github.com/HughTang/Leetcode-Python/tree/main/Bit%20Manipulation
Bit Manipulationhttps://github.com/HughTang/Leetcode-Python/tree/main/Bit%20Manipulation
Divide and Conquerhttps://github.com/HughTang/Leetcode-Python/tree/main/Divide%20and%20Conquer
Divide and Conquerhttps://github.com/HughTang/Leetcode-Python/tree/main/Divide%20and%20Conquer
Dynamic Programminghttps://github.com/HughTang/Leetcode-Python/tree/main/Dynamic%20Programming
Dynamic Programminghttps://github.com/HughTang/Leetcode-Python/tree/main/Dynamic%20Programming
Graphhttps://github.com/HughTang/Leetcode-Python/tree/main/Graph
Graphhttps://github.com/HughTang/Leetcode-Python/tree/main/Graph
Greedyhttps://github.com/HughTang/Leetcode-Python/tree/main/Greedy
Greedyhttps://github.com/HughTang/Leetcode-Python/tree/main/Greedy
Hash Tablehttps://github.com/HughTang/Leetcode-Python/tree/main/Hash%20Table
Hash Tablehttps://github.com/HughTang/Leetcode-Python/tree/main/Hash%20Table
Linked Listhttps://github.com/HughTang/Leetcode-Python/tree/main/Linked%20List
Linked Listhttps://github.com/HughTang/Leetcode-Python/tree/main/Linked%20List
Mathhttps://github.com/HughTang/Leetcode-Python/tree/main/Math
Mathhttps://github.com/HughTang/Leetcode-Python/tree/main/Math
Plalindromehttps://github.com/HughTang/Leetcode-Python/tree/main/Plalindrome
Plalindromehttps://github.com/HughTang/Leetcode-Python/tree/main/Plalindrome
Searchhttps://github.com/HughTang/Leetcode-Python/tree/main/Search
Searchhttps://github.com/HughTang/Leetcode-Python/tree/main/Search
Sorthttps://github.com/HughTang/Leetcode-Python/tree/main/Sort
Sorthttps://github.com/HughTang/Leetcode-Python/tree/main/Sort
Stack and Queuehttps://github.com/HughTang/Leetcode-Python/tree/main/Stack%20and%20Queue
Stack and Queuehttps://github.com/HughTang/Leetcode-Python/tree/main/Stack%20and%20Queue
Stringhttps://github.com/HughTang/Leetcode-Python/tree/main/String
Stringhttps://github.com/HughTang/Leetcode-Python/tree/main/String
Tencenthttps://github.com/HughTang/Leetcode-Python/tree/main/Tencent
Tencenthttps://github.com/HughTang/Leetcode-Python/tree/main/Tencent
Treehttps://github.com/HughTang/Leetcode-Python/tree/main/Tree
Treehttps://github.com/HughTang/Leetcode-Python/tree/main/Tree
Two Pointershttps://github.com/HughTang/Leetcode-Python/tree/main/Two%20Pointers
Two Pointershttps://github.com/HughTang/Leetcode-Python/tree/main/Two%20Pointers
Written Examinationhttps://github.com/HughTang/Leetcode-Python/tree/main/Written%20Examination
Written Examinationhttps://github.com/HughTang/Leetcode-Python/tree/main/Written%20Examination
X_Practicehttps://github.com/HughTang/Leetcode-Python/tree/main/X_Practice
X_Practicehttps://github.com/HughTang/Leetcode-Python/tree/main/X_Practice
.DS_Storehttps://github.com/HughTang/Leetcode-Python/blob/main/.DS_Store
.DS_Storehttps://github.com/HughTang/Leetcode-Python/blob/main/.DS_Store
Python面试宝典-基础篇-2020.mdhttps://github.com/HughTang/Leetcode-Python/blob/main/Python%E9%9D%A2%E8%AF%95%E5%AE%9D%E5%85%B8-%E5%9F%BA%E7%A1%80%E7%AF%87-2020.md
Python面试宝典-基础篇-2020.mdhttps://github.com/HughTang/Leetcode-Python/blob/main/Python%E9%9D%A2%E8%AF%95%E5%AE%9D%E5%85%B8-%E5%9F%BA%E7%A1%80%E7%AF%87-2020.md
README.mdhttps://github.com/HughTang/Leetcode-Python/blob/main/README.md
README.mdhttps://github.com/HughTang/Leetcode-Python/blob/main/README.md
leetcode.code-workspacehttps://github.com/HughTang/Leetcode-Python/blob/main/leetcode.code-workspace
leetcode.code-workspacehttps://github.com/HughTang/Leetcode-Python/blob/main/leetcode.code-workspace
test.pyhttps://github.com/HughTang/Leetcode-Python/blob/main/test.py
test.pyhttps://github.com/HughTang/Leetcode-Python/blob/main/test.py
刷题记录.mdhttps://github.com/HughTang/Leetcode-Python/blob/main/%E5%88%B7%E9%A2%98%E8%AE%B0%E5%BD%95.md
刷题记录.mdhttps://github.com/HughTang/Leetcode-Python/blob/main/%E5%88%B7%E9%A2%98%E8%AE%B0%E5%BD%95.md
READMEhttps://github.com/HughTang/Leetcode-Python
https://github.com/HughTang/Leetcode-Python#刷题心得
https://github.com/HughTang/Leetcode-Python#1如何通过字典的value来访问key
https://github.com/HughTang/Leetcode-Python#现有博客中介绍过很多实现方法但是大多数都要求value值必须唯一真实情况下的实用性太差这里记录一个简单实用的思路即构建一个新的字典进行键值的反转但由于无法保证value值的唯一性因此新字典中的每个键对应的值需要为一个列表关键代码如下
https://github.com/HughTang/Leetcode-Python#典型题目为桶排序的347-前k个高频元素和451-根据字符出现频率排序
https://github.com/HughTang/Leetcode-Python#2同时获取数组元素出现频率和子序列长度的方法
https://github.com/HughTang/Leetcode-Python#用一个字典同时存储给定数组的数值及相应数值所在的下标和个数如下格式数值1下标1下标2下标m即数值下标列表的方法来存储这样既可以获取某数值的范围也可以通过len的方法获取特定数值在数组中出现的次数一举两得关键代码如下
https://github.com/HughTang/Leetcode-Python#典型题目为697-数组的度
https://github.com/HughTang/Leetcode-Python#3在存储临时判别元素时尽量用字典或集合不要用列表元组和字符串因为集合和字典的存取时间复杂度为o1查询效率更高此外在查询速度和内存占用方面列表与字典的区别如下
https://github.com/HughTang/Leetcode-Python#4在列表中找寻和为target的子列表
https://github.com/HughTang/Leetcode-Python#此类题目如果按照所求子列表中元素是否是连续的可以分为在列表中找寻元素组合-或-在列表中找寻子序列
https://github.com/HughTang/Leetcode-Python#1如果是寻找连续子序列一般通过哈希表字典来实现可以根据所求结果将题目分为-求满足题意的子列表个数-或-求最大子序列长度如果是求子序列的个数一般哈希表初始化为01保证其提前涵盖了列表中的某个值正好等于target的情况如果是求连续子序列的最大长度一般哈希表初始化为0-1保证其提前涵盖了列表中的最长子序列是从第一个元素就开始的情况典型题目如下
https://github.com/HughTang/Leetcode-Python#2如果是寻找非连续子序列即寻找的是列表的元素组合是否能够相加等于target一般通过dp或dfsbfs来实现可以根据所求结果将题目分为-求是否存在某种组合求满足题意的组合个数求组合元素数量最少的情况求所有的组合情况列表其中一般通过dp来实现一般通过dfsbfs来实现需要注意的是也可以通过dfs来实现但是可能会超时典型题目如下
https://github.com/HughTang/Leetcode-Python#5判断字符串是否是纯数字
https://github.com/HughTang/Leetcode-Python#6print调整数字的精度及带符号输出
https://github.com/HughTang/Leetcode-Python#7进制转换
https://github.com/HughTang/Leetcode-Python#8any与all的使用
https://github.com/HughTang/Leetcode-Python#any-函数用于判断给定的可迭代参数-iterable-是否全部为-false则返回-false如果有一个为-true则返回-true元素除了是-0空false-外都算-true函数等价于
https://github.com/HughTang/Leetcode-Python#all-函数用于判断给定的可迭代参数-iterable-中的所有元素是否都为-true如果是返回-true否则返回-false元素除了是-0空nonefalse-外都算-true函数等价于
https://github.com/HughTang/Leetcode-Python#9判断两个字符串是否含有相同字符
https://github.com/HughTang/Leetcode-Python#典型题目
https://github.com/HughTang/Leetcode-Python#需要时常回顾的难题
https://github.com/HughTang/Leetcode-Python#string
https://github.com/HughTang/Leetcode-Python#linked-list
https://github.com/HughTang/Leetcode-Python#stack-and-queue
https://github.com/HughTang/Leetcode-Python#hash-table
https://github.com/HughTang/Leetcode-Python#array-and-matrix
https://github.com/HughTang/Leetcode-Python#bit-manipulation
https://github.com/HughTang/Leetcode-Python#two-pointers
https://github.com/HughTang/Leetcode-Python#sort
https://github.com/HughTang/Leetcode-Python#math
Readme https://github.com/HughTang/Leetcode-Python#readme-ov-file
Please reload this pagehttps://github.com/HughTang/Leetcode-Python
Activityhttps://github.com/HughTang/Leetcode-Python/activity
0 starshttps://github.com/HughTang/Leetcode-Python/stargazers
1 watchinghttps://github.com/HughTang/Leetcode-Python/watchers
0 forkshttps://github.com/HughTang/Leetcode-Python/forks
Report repository https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FHughTang%2FLeetcode-Python&report=HughTang+%28user%29
Releaseshttps://github.com/HughTang/Leetcode-Python/releases
Packages 0https://github.com/users/HughTang/packages?repo_name=Leetcode-Python
Python 99.8% https://github.com/HughTang/Leetcode-Python/search?l=python
Java 0.2% https://github.com/HughTang/Leetcode-Python/search?l=java
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.