- 博客(38)
- 资源 (7)
- 收藏
- 关注
转载 String Reduction
问题描述:Given a string consisting of a,b and c's, we can perform the following operation: Take any two adjacent distinct characters and replace it with the third character. For example, if 'a' and 'c'
2014-11-20 13:08:52 933
原创 LeetCode 151 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
2014-11-05 11:24:28 641
原创 LeetCode 150 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)).分析:看见对数时间复杂度,那么yidings
2014-11-05 11:02:43 915
原创 LeetCode 149 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. For
2014-11-02 09:50:54 926
原创 LeetCode 148 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 and return it as a link
2014-11-02 09:50:25 810
原创 LeetCode 147 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.分析:
2014-11-01 16:45:24 768
原创 LeetCode 146 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)
2014-11-01 16:38:16 651
原创 LeetCode 145 Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before c
2014-11-01 16:20:54 638
原创 LeetCode 144 String to Integer (atoi)
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca
2014-11-01 16:16:12 700
原创 LeetCode 143 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of convert
2014-11-01 16:09:53 639
原创 LeetCode 142 Regular Expression Matching
Implement regular expression matching with support for '.' and '*'.
2014-11-01 16:04:41 782
原创 LeetCode 141 Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two
2014-11-01 15:16:22 907
原创 LeetCode 140 Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.分析:
2014-11-01 15:07:55 830
原创 LeetCode 139 Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.
2014-11-01 14:48:26 602
原创 LeetCode 138 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
2014-11-01 14:30:18 519
原创 LeetCode 137 3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c) must
2014-11-01 14:23:24 781
原创 LeetCode 136 3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly
2014-11-01 14:08:58 683
原创 LeetCode 135 4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Elements in a
2014-11-01 14:04:41 559
原创 LeetCode 134 Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.
2014-11-01 13:49:39 657
原创 LeetCode 133 Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.For example,
2014-11-01 13:39:45 645
原创 LeetCode 132 Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all valid
2014-11-01 13:26:30 592
原创 LeetCode 131 Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())", "(())()", "()(())", "()()
2014-11-01 13:09:09 737
原创 LeetCode 130 Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
2014-11-01 11:43:39 722
原创 LeetCode 129 Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y
2014-11-01 11:16:32 680
原创 LeetCode 128 Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is
2014-11-01 11:01:54 630
Java核心技术第8版 卷I 基础知识part2 中文版 有目录可标记
2013-01-08
Java核心技术第8版 卷I 基础知识part1 中文版 有目录可标记
2013-01-08
Java核心技术第8版 卷II 高级特性part3 中文版 有目录可标记
2013-01-08
Java核心技术第8版 卷II 高级特性part2 中文版 有目录可标记
2013-01-08
Java核心技术第8版 卷II 高级特性part1 中文版 有目录可标记
2013-01-08
C++程序间消息模式通信(VS2010工程文件)
2012-11-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人