LeetCode学习
「已注销」
这个作者很懒,什么都没留下…
展开
-
1. 两数之和_Two Sum
Two SumGiven 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 may not use th...原创 2019-09-06 19:02:58 · 90 阅读 · 0 评论 -
2. 两数相加_Add Two Numbers
Add Two NumbersYou 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 numb...原创 2019-09-06 19:06:57 · 148 阅读 · 1 评论 -
3. 无重复字符的最长子串_Longest Substring Without Repeating Characters
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。题目来源:力扣(LeetCode)链接:https://leetc...原创 2019-09-06 19:16:42 · 121 阅读 · 0 评论 -
4. 寻找两个有序数组的中位数_Median of Two Sorted Arrays
Median of Two Sorted ArraysThere are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n))....原创 2019-09-06 19:19:18 · 84 阅读 · 0 评论 -
5. 最长回文子串_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.给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。题目来源:力扣(L...原创 2019-09-06 19:23:32 · 106 阅读 · 0 评论 -
6. Z 字形变换_ZigZag Conversion
ZigZag Conversion将一个给定字符串根据给定的行数,以从上往下、从左到右进行 Z 字形排列。题目来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/zigzag-conversionThe string “PAYPALISHIRING” is written in a zigzag pattern on a given numb...原创 2019-09-06 19:27:15 · 117 阅读 · 0 评论 -
7. 整数反转_ Reverse Integer
Reverse IntegerGiven a 32-bit signed integer, reverse digits of an integer.给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。题目来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/reverse-integerExample 1:Input:...原创 2019-09-06 19:28:35 · 100 阅读 · 0 评论 -
8. 字符串转换整数 (atoi)_String to Integer (atoi)
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 character is found....原创 2019-09-06 19:30:44 · 252 阅读 · 0 评论 -
9. 回文数_Palindrome Number
Palindrome NumberDetermine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.判断一个整数是否是回文数。回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。题目来源:力扣(LeetCode)链接:...原创 2019-09-06 19:32:34 · 120 阅读 · 0 评论