- 博客(10)
- 收藏
- 关注
原创 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
2015-03-22 14:23:45 266
原创 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. public class Solut
2015-03-22 14:21:05 280
原创 4 Median of Two Sorted Arrays
There are two sorted arrays A and B 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)). public class Solution { p
2015-03-22 14:08:54 236
原创 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 length is 3. Fo
2015-03-22 14:06:44 170
原创 35 Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array.
2015-03-22 14:00:07 302
原创 30 Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without
2015-03-22 13:55:28 198
原创 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 to the target, whe
2015-03-22 13:54:22 210
原创 57 Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Examp
2015-03-22 13:48:38 383
原创 56 Merge Intervals
Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. /** * Definition for an interval. * public class
2015-03-22 13:45:56 222
原创 126 word Ladder
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Only one letter can be changed at a timeEach intermediate word must exi
2015-03-21 14:33:53 328
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人