leetcode143zigzag-conversion
摘要:题目描述 字符串"PAYPALISHIRING"写成3行的Z字形的样式如下: P A H N↵A P L S I I G↵Y I R 按行读这个Z字形图案应该是 "PAHNAPLSIIGYIR" 请编写代码完成将字符串转化为指定行数的Z字形字符串: string convert(string tex
阅读全文
posted @
2020-07-21 10:17
滚雪球效应
阅读(141)
推荐(0)
leetcode144 longest-palindromic-substring
摘要:题目描述 找出给出的字符串S中最长的回文子串。假设S的最大长度为1000,并且只存在唯一解。 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length o
阅读全文
posted @
2020-07-21 08:34
滚雪球效应
阅读(169)
推荐(0)
leetcode144add-two-numbers
摘要:题目描述 给定两个代表非负数的链表,数字在链表中是反向存储的(链表头结点处的数字是个位数,第二个结点上的数字是十位数...),求这个两个数的和,结果也用链表表示。 输入:(2 -> 4 -> 3) + (5 -> 6 -> 4) 输出: 7 -> 0 -> 8 You are given two l
阅读全文
posted @
2020-07-20 14:50
滚雪球效应
阅读(150)
推荐(0)
leetcode146 longest-substring-without-repeating-character
摘要:题目描述 给定一个字符串,找出最长的不具有重复字符的子串的长度。例如,“abcabcbb”不具有重复字符的最长子串是“abc”,长度为3。对于“bbbbb”,最长的不具有重复字符的子串是“b”,长度为1。 Given a string, find the length of the longest
阅读全文
posted @
2020-07-19 08:20
滚雪球效应
阅读(101)
推荐(0)
leetcode147median-of-two-sorted-arrays
摘要:题目描述 有两个大小分别为m和n的有序数组A和B。请找出这两个数组的中位数。你需要给出时间复杂度在O(log (m+n))以内的算法。 There are two sorted arrays A and B of size m and n respectively. Find the median
阅读全文
posted @
2020-07-18 07:10
滚雪球效应
阅读(183)
推荐(0)
leetcode148two-sum
摘要:Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n
阅读全文
posted @
2020-07-17 10:43
滚雪球效应
阅读(152)
推荐(0)