
LeetCode
文章平均质量分 62
Rich Sniper
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode(Python3)6. Z字型变换
【代码】LeetCode(Python3)6. Z字型变换。原创 2022-09-29 21:01:12 · 303 阅读 · 0 评论 -
LeetCode(Python3)5.最长回文子串
Question: Given a strings, returnthe longest palindromic substringins. Example1: Input: s = "babad" Output: "bab" Explanation:"aba" is also a valid answer. Example2: Input: s = "cbbd" Output: "bb" Mentality: 这道题可以用中心扩散法来解,依次判断我们子串所能达到的最...原创 2022-05-11 21:13:41 · 1479 阅读 · 0 评论 -
LeetCode(Python3)4.寻找两个正序数组的中位数
Question: Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example1: Input: nums1 = [1,3], nums2 = [2]Output: 2.00000Explanation:原创 2022-05-09 17:57:49 · 1260 阅读 · 1 评论 -
LeetCode(Python3)3.无重复字符的最长子串
Question: Given a string s, find the length of the longest substring without repeating characters. Example1: Input: s = "abcabcbb"Output: 3Explanation: The answer is "abc", with the length of 3. Example2: Input: s = "bbbbb"Output: 1Explanation: The原创 2022-05-08 09:41:07 · 724 阅读 · 0 评论 -
LeetCode(Python3)1.两数之和 2.两数相加
目录 两数之和 两数相加 两数之和 Question: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element原创 2022-05-04 20:16:25 · 234 阅读 · 0 评论