
leetcode
文章平均质量分 59
某日暮光
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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)).Example 1:nums1 =原创 2017-05-02 14:01:46 · 312 阅读 · 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.Example:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.原创 2017-05-03 09:08:25 · 310 阅读 · 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 I转载 2017-05-03 19:29:08 · 315 阅读 · 0 评论 -
leetcode-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原创 2017-04-24 20:19:52 · 349 阅读 · 0 评论 -
leetcode-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 return i原创 2017-04-26 16:22:13 · 391 阅读 · 0 评论 -
leetcode-3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "原创 2017-04-27 19:33:50 · 237 阅读 · 0 评论 -
leetcode— 9. Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.class Solution {public: bool isPalindrome(int x) { int a, b, tmp;int i = 0; a = 0; b = (x); while (b > 0) //负数不是原创 2017-06-01 22:15:50 · 270 阅读 · 0 评论