文章
LeetCode 28_Implement strStr()
题目返回字符串haystack中第一次出现子字符串needle的indexImplementstrStr().Returnstheindexofthefirstoccurrenceofneedleinhaystack,or1ifneedleis
LeetCode 26_Remove Duplicates from Sorted Array 移重
题目给定排好序的数组,计算不重复数的个数n,并将这n个数排在数组的前n位。不能使用辅助数组(额外空间)。Givenasortedarray,removetheduplicatesinplacesuchthateachelementappearonlyon
LeetCode 50_Pow(x, n) 乘方实现
这个实现很简单,就是实现的时候注意细节就可以了。傻白甜做法乘方n的取值分成三类情况,大于0,等于0,小于0逐层递归漏洞漏洞一:时间O(n),当n很大时,慢到爆炸漏洞二:未考虑边界条件nInteger.MIN_VALUE,这个时候n赋
Leetcode 44 Wildcard Matching 通配符匹配
<blockquote<pImplementwildcardpatternmatchingwithsupportfor&39;?&39;and&39;&39;.<br/</p<p&39;?&39;Matchesanysinglecharacter
Leetcode 10 Regular Expression Matching 简单正则匹配
<blockquote<pImplementregularexpressionmatchingwithsupportfor&39;.&39;and&39;&39;.</p<p&39;.&39;Matchesanysinglecharacter.&
Leetcode 9 Palindrome Number 回文数字判定
<blockquote<pDeterminewhetheranintegerisapalindrome.<strongDothiswithoutextraspace.</strong</p<pSomehints:Couldnegativeintegers
Leetcode 8 String to Integer (atoi)
<blockquote<pImplementatoitoconvertastringtoaninteger.</p<p<strongHint:</strongCarefullyconsiderallpossibleinputcases.Ifyouwa
Leetcode 7 Reverse Integer 倒序整数
原题目为:<blockquote<p<strongReversedigitsofaninteger.</strong<br/<strongExample1</strong:x123,return321<br/<br/<strongExample2</s
leetcode讲解--343. Integer Break
343.IntegerBreak题目地址(https://link.segmentfault.com/?encEu%2F62W1NT1rULv0FINccPQ%3D%3D.5%2FXViguuvR6Bw2CAdaaEdDtjXh1hmPEjTXeJYg73pp39nYlMPD
leetcode讲解--217. Contains Duplicate
217.ContainsDuplicateGivenanarrayofintegers,findifthearraycontainsanyduplicates.Yourfunctionshouldreturntrueifanyvalueapp
已加载文章中没有匹配内容,试试其他关键词或清空搜索。