leet code
ma_ke_xin
这个作者很懒,什么都没留下…
展开
-
leetcode 无重复字符的最长子串
leetcode 无重复字符的最长子串给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。示例 1:输入: “abcabcbb”输出: 3解释: 因为无重复字符的最长子串是 “abc”,所以其长度为 3。示例 2:输入: “bbbbb”输出: 1解释: 因为无重复字符的最长子串是 “b”,所以其长度为 1。示例 3:输入: “pwwkew”输出: 3解释: 因...原创 2020-02-25 20:33:28 · 204 阅读 · 0 评论 -
leetcode 两数相加
leetcode 两数相加给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。您可以假设除了数字 0 之外,这两个数都不会以 0 开头。示例:输入:(2 -> 4 -> 3) + (5 -> 6 -> 4)输出:7 ...原创 2020-02-25 20:01:30 · 130 阅读 · 0 评论 -
leetcode——Container With Most Water
leetcode——Container With Most Water【题目描述】Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of ...原创 2020-01-12 11:39:52 · 130 阅读 · 0 评论 -
leetcode——Regular Expression Matching
## leetcode ——Regular Expression Matching【题目描述】Given an input string (s) and a pattern §, implement regular expression matching with support for ‘.’ and ‘*’.‘.’ Matches any single character.‘*’ Ma...原创 2020-01-11 18:01:55 · 150 阅读 · 0 评论 -
leetcode——Palindrome Number
leetcod——Palindrome Number【题目描述】Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Inp...原创 2020-01-10 22:44:05 · 181 阅读 · 0 评论 -
leetcode——String to Integer (atoi)
leetcode——String to Integer (atoi)【题目描述】Implement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace ch...原创 2020-01-09 16:30:47 · 116 阅读 · 0 评论 -
leetcode——Reverse Integer
leetcode——Reverse Integer【题目描述】Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Not...原创 2020-01-08 10:11:02 · 113 阅读 · 0 评论 -
leetcode——ZigZag Conversion
LeetCode——ZigZag Conversion【题目描述】The 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 legi...原创 2020-01-07 10:33:43 · 103 阅读 · 0 评论 -
leetcode——Longest Palindromic Substring
## LeetCode——Longest Palindromic Substring【题目描述】Given 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: ...原创 2020-01-06 13:58:11 · 109 阅读 · 0 评论 -
leetcode——Longest Substring Without Repeating Characters
【题目描述】Given a string, find the length of the longest substring without repeating characters.Example 1:Input: “abcabcbb”Output: 3Explanation: The answer is “abc”, with the length of 3.Example 2:...原创 2019-12-30 22:42:30 · 71 阅读 · 0 评论 -
leet code: Two Sum
leet code: Two Sum题目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-07-15 21:38:20 · 311 阅读 · 0 评论