文章
【Leetcode】12. Integer to Roman 阿拉伯数字转罗马数字
1.题目Givenaninteger,convertittoaromannumeral.Inputisguaranteedtobewithintherangefrom1to3999.2.思路罗马数字的规则:字符:M
【Leetcode】11. Container With Most Water 数列中选两个值使得中间的面积最大
1.题目Givennnonnegativeintegersa1,a2,...,an,whereeachrepresentsapointatcoordinate(i,ai).nverticallinesaredrawnsuchthatth
【leetcode】10. Regular Expression Matching 简易正则匹配
1.题目Implementregularexpressionmatchingwithsupportfor&39;.&39;and&39;&39;.&39;.&39;Matchesanysinglecharacter.&39;&39;M
【Leetcode】9. Palindrome Number 判断一个数字是否是回文数字
1.题目Determinewhetheranintegerisapalindrome.Dothiswithoutextraspace.2.思路反转后和自身比较是否相等。不需要考虑溢出,因为如果是回文就不会溢出。如果溢出一定不是。3.
【Leetcode】8. String to Integer (atoi) 字符串转整型
1.题目Implementatoitoconvertastringtoaninteger.Hint:Carefullyconsiderallpossibleinputcases.Ifyouwantachallenge,pleasedono
【Leetcode】7. Reverse Integer 整数字面反转
1.题目Reversedigitsofaninteger.Example1:x123,return321Example2:x123,return3212.思路如果是负数,先转换为正数在处理,处理之后再补上符号位。通过模10、余
【Leetcode】6. ZigZag Conversion
1.题目Thestring&34;PAYPALISHIRING&34;iswritteninazigzagpatternonagivennumberofrowslikethis:(youmaywanttodisplaythispatte
【leetcode】5. Longest Palindromic Substring 最长回文子串
1.题目GivenastringS,findthelongestpalindromicsubstringinS.YoumayassumethatthemaximumlengthofSis1000,andthereexistsoneun
【leetcode】4. Median of Two Sorted Arrays 两个有序数组组成集合的中位数
1.题目Therearetwosortedarraysnums1andnums2ofsizemandnrespectively.Findthemedianofthetwosortedarrays.Theoverallruntimec
【Leetcode】3. Longest Substring Without RepeatingCharacters无重最长子串
1.题目Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Examples:Given&34;abcabcbb&34;,theansweris
已加载文章中没有匹配内容,试试其他关键词或清空搜索。