![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetCode
leetCode刷题记录
formst001
这个作者很懒,什么都没留下…
展开
-
9. 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:Input: -121Output: falseExplana...原创 2020-03-15 18:18:49 · 61 阅读 · 0 评论 -
8. 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. Then, starting from t...原创 2020-03-15 18:01:53 · 70 阅读 · 0 评论 -
7. 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: 21Note:Assume we are dealing with ...原创 2020-03-15 17:11:38 · 69 阅读 · 0 评论 -
6. 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 legibility)P A H NA P L S I ...原创 2020-03-15 16:45:22 · 94 阅读 · 0 评论 -
5. 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: “bab”Note: “aba” is also a valid answer.Examp...原创 2020-03-15 15:13:36 · 59 阅读 · 0 评论 -
4. Median of Two Sorted Arrays
题目There 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)).You may assume nums1 and ...原创 2020-03-14 18:07:44 · 70 阅读 · 0 评论 -
3. 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:Inpu...原创 2020-03-14 16:21:58 · 69 阅读 · 0 评论 -
2. 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 retur...原创 2020-03-13 20:48:17 · 67 阅读 · 0 评论 -
1. 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 may not use the sam...原创 2020-03-13 20:08:58 · 58 阅读 · 0 评论