上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页
摘要: 一、问题描述 Description: There are a total of n courses you have to take, labeled from 0 to n−1. Some courses may have prerequisites, for e... 阅读全文
posted @ 2015-05-13 23:42 神奕 阅读(166) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: Determine whether an integer is a palindrome. Do this without extra space.判断一个整数是否是回文数,不要使用额外的空间。二、解题报告解题时我们需要注意一下几点:... 阅读全文
posted @ 2015-05-13 22:53 神奕 阅读(124) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you wa... 阅读全文
posted @ 2015-05-13 22:16 神奕 阅读(157) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: Reverse digits of an integer. For example: Input x = 123, return 321 Input x = -123, return -321二、解题报告本题是对一个整... 阅读全文
posted @ 2015-05-12 22:05 神奕 阅读(101) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to disp... 阅读全文
posted @ 2015-05-12 21:48 神奕 阅读(121) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, a... 阅读全文
posted @ 2015-05-12 21:22 神奕 阅读(135) 评论(0) 推荐(0)
摘要: 回文串,就是指正读和反读都一样的字符串,比如"level"或者"noon"等等。那么,如何求一个字符串的最长回文子串(Longest Palindromic Substring)?这里我们有多种解法。解法一:暴力法暴力解法就是直接枚举所有子串,对每个子串判断是否为回文,时间复杂度为... 阅读全文
posted @ 2015-05-12 20:50 神奕 阅读(167) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the su... 阅读全文
posted @ 2015-05-12 12:50 神奕 阅读(142) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. T... 阅读全文
posted @ 2015-05-12 11:04 神奕 阅读(158) 评论(0) 推荐(0)
摘要: 一、问题描述 Description: Given a string, find the length of the longest substring without repeating characters. For example: For "abcab... 阅读全文
posted @ 2015-05-12 00:35 神奕 阅读(112) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 15 下一页