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: 121 Output: true Example 2: Input: -121 Output: false Explana...原创 2020-03-15 18:18:49 · 126 阅读 · 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 · 157 阅读 · 0 评论 -
7. Reverse Integer
题目 Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dealing with ...原创 2020-03-15 17:11:38 · 144 阅读 · 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 N A P L S I ...原创 2020-03-15 16:45:22 · 159 阅读 · 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 · 129 阅读 · 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 · 129 阅读 · 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: 3 Explanation: The answer is “abc”, with the length of 3. Example 2: Inpu...原创 2020-03-14 16:21:58 · 132 阅读 · 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 · 130 阅读 · 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 · 119 阅读 · 0 评论
分享