文章
[LeetCode]两个排序数组的中位数(Median of Two Sorted Arrays)
题目描述给定两个大小为m和n的有序数组nums1和nums2。请找出这两个有序数组的中位数。要求算法的时间复杂度为O(log(mn))。<blockquote示例1:<br/nums11,3<br/nums22<br/中位数是
LeetCode算法系列_0862_和至少为K的最短子数组
0862_和至少为K的最短子数组(https://link.segmentfault.com/?encrMLce7JliFCrxcjItefsPw%3D%3D.0vXNWPI6WlpFVuks0JHEe7jIpoTO0RlFc%2B%2BfYzzcVxKjOP62EA%2FN6Wg7
811-子域名访问计数
前言LeetCode上一道不算难的题目,但是一开始做的时候,执行时间很不理想,通过多次修改代码,总算是改到比较满意的地步。原题目(https://link.segmentfault.com/?encR2esyOnH8PLaPMfcEptNBw%3D%3D.VEQcyJMKS6Qxw
[LeetCode]无重复字符的最长子串(LongestSubstringWithoutRepeatingCharacters)
题目描述给定一个字符串,找出不含有重复字符的最长子串的长度。<blockquote示例:<br/给定&34;abcabcbb&34;,没有重复字符的最长子串是&34;abc&34;,那么长度就是3。<br/给定&34;bbbbb&34;,最长的子串就是
[LeetCode]两数相加(Add Two Numbers)
题目描述给定两个非空链表来表示两个非负整数。位数按照逆序方式存储,它们的每个节点只存储单个数字。将两数相加返回一个新的链表。你可以假设除了数字0之外,这两个数字都不会以零开头。<blockquote示例:<br/输入:(2>4>3)(5&g
209. Minimum Size Subarray Sum
<blockquoteGivenanarrayofnpositiveintegersandapositiveintegers,find<br/theminimallengthofacontiguoussubarrayofwhichthesum≥s.
[LeetCode]两数之和(Two Sum)
题目描述给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。<blockquote示例:<br/给定nums2,7,11,15,target9<br/因为nums0nu
485. Max Consecutive Ones
<blockquote<pGivenabinaryarray,findthemaximumnumberofconsecutive1sin<br/thisarray.</p<pExample1:Input:1,1,0,1,1,1Output:3Ex
27 Remove Element
<blockquoteGivenanarraynumsandavalueval,removeallinstancesofthat<br/valueinplaceandreturnthenewlength.<pDonotallocateextrasp
561. Array Partition I
<pre<code>Givenanarrayof2nintegers,yourtaskistogrouptheseintegersintonpairsofinteger,say(a1,b1),(a2,b2),...,(an,bn)whi
已加载文章中没有匹配内容,试试其他关键词或清空搜索。