![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
文章平均质量分 65
keybord_dancer
这个作者很懒,什么都没留下…
展开
-
LeetCode #2 Add Two Numbers
题目原文提交代码题目原文 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers an原创 2015-08-09 16:28:17 · 250 阅读 · 0 评论 -
LeetCode #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)).这道题是第一道标为hard的题,要求求出两个原创 2015-08-09 17:10:20 · 272 阅读 · 0 评论 -
LeetCode#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, and there exists one unique longest palindromic substring.这道题是字符串处理中非常经典的题目,求原创 2015-08-09 17:18:42 · 313 阅读 · 0 评论 -
LeetCode #1 Two Sum
题目原文提交代码题目原文 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up原创 2015-08-09 16:23:48 · 329 阅读 · 0 评论 -
LeetCode #3 Longest Substring Without Repeating Characters
题目原文 Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the lengt原创 2015-08-09 16:59:47 · 335 阅读 · 0 评论 -
Leetcode #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原创 2015-08-24 11:46:44 · 309 阅读 · 0 评论 -
Leetcode #7 Reverse Integer
题目原文 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321题目的意思很简单,把一个整数倒过来。值得注意的有以下几点:注意倒过来之后的溢出问题,溢出的话返回0注意0结尾的数字,翻转之后要把0拿去。提交代码int reverse(int x) {原创 2015-08-24 16:24:21 · 339 阅读 · 0 评论