
LeetCode
Ken_Li_Lsq
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode:Longest Substring Without Repeating Characters
Longest Substring Without Repeating CharactersMediumGiven a string, find the length of thelongest substringwithout repeating characters.Example 1:Input: "abcabcbb"Output: 3Explanation: Th...原创 2019-07-02 14:45:53 · 203 阅读 · 0 评论 -
LeetCode:判断字符串是否回文(Palindrome Number)
8.判断字符串是否回文(Palindrome Number)例子1:Input: 121Output: true例子 2:Input: -121Output: false说明:从左到右,它显示为-121。 从右到左,它变成121-。 因此它不是回文。例子3:Input: 10Output: false说明:从右到左读取01。 因此它不是回文。 ...原创 2019-08-18 12:19:04 · 634 阅读 · 0 评论 -
LeetCode:8.字符串转整型 (String to Integer (atoi))
文章目录8.字符串转整型 (String to Integer (atoi))说明样例1样例2样例3样例4样例 5实现代码Note:Example 1:Example 2:Example 3:Example 4:Example 5:8.字符串转整型 (String to Integer (atoi))实现把字符串转成整型。函数首先把所有的空格去掉直到第一个字符不是空格,然后取出一个正负号,...原创 2019-08-08 09:49:16 · 288 阅读 · 0 评论 -
LeetCode:翻转字符串(7. Reverse Integer)
LeetCode:7. Reverse IntegerGiven a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:put: -123Output: -321Example 3:Input: 120Output: 21Note...原创 2019-08-01 10:38:51 · 213 阅读 · 0 评论 -
LeetCode 字符串转换Z形状(6. ZigZag Conversion)
6. ZigZag ConversionThe string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better leg...原创 2019-07-24 16:36:50 · 262 阅读 · 0 评论 -
LeetCode:获取回文的字符串(Longest Palindromic Substring)
Longest Palindromic SubstringGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: “babad”Output: “bab”Note: “aba”...原创 2019-07-15 15:33:56 · 287 阅读 · 0 评论 -
LeetCode:Median of Two Sorted Arrays(获取两个有序数组中的中间值)
4.Median of Two Sorted ArraysThere are two sorted arraysnums1andnums2of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+...原创 2019-07-09 08:57:11 · 294 阅读 · 0 评论 -
LeetCode:Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...原创 2019-06-24 17:06:13 · 129 阅读 · 0 评论 -
Leetcode:Two Sum
**1. Two Sum(Easy)**Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you ...原创 2019-06-24 17:05:23 · 144 阅读 · 0 评论 -
LeetCode:10.表达式匹配(Regular Expression Matching)
10.表达式匹配(Regular Expression Matching)给定参数字符串s和匹配表达式p,实现支持 . 和 * 的表达式匹配,需要匹配整个字符串(而不是其中一部分)。说明字符串s可以为空,可以只包含小写字母a-z。匹配表达式p可以为空,可以只包含小写字母a-z,也可以是 . 或 * 。例子1输入: s=“aa” p=“a”输出: false说明: 匹配表示...原创 2019-08-29 11:22:48 · 217 阅读 · 0 评论