- 博客(16)
- 资源 (15)
- 问答 (1)
- 收藏
- 关注
原创 leetcode——Palindrome Partitioning II
题目:Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = "aab"
2014-12-28 16:52:41 610
原创 leetcode——Edit Distance
题目:Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on
2014-12-20 21:00:34 564
原创 leetcode——Rotate Image
题目:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?思路:首先,要求原地调整,那么需要寻找变换规律。举个例子:对于3x3的矩阵,如顺
2014-12-13 21:23:48 618
原创 leetcode——Permutations
题目:Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].思路:递
2014-12-13 20:47:15 562
原创 leetcode——Find Minimum in Rotated Sorted Array II
题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.The array may contain dup
2014-12-13 20:24:18 518
原创 leetcode——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.思路:1000之内
2014-12-09 14:45:50 584
原创 leetcode——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].(最终区间)思路:该题是一道极角排序的类似题目。我们可以使用O(n)复
2014-12-08 15:28:58 523
原创 leetcode——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-12-06 20:21:00 621
原创 leetcode——Find Peak Element
题目:A peak element is an only element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multi
2014-12-06 19:16:12 989
原创 leetcode——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,
2014-12-06 18:21:31 606
原创 cronExpression表达式使用方法
本内容跟spring中的quartz定时器相关,该定时器使用该表达是作为事件的时间控制。1、表示形式该表达式简洁简单,总共有7个空格分割的表达子式,形式为【* * * * * * *】而这七个位置上的东西表达方式有很多,意义从左往右依次是:秒 分 时 日 月 周 年,往往,“年”这个标志位可以不写,而其余的必须表示出来。2、常用规则*(星号)——代表该标志位的每一个。即
2014-12-05 15:39:01 1632
原创 Spring定时器配置及使用
spring中集成了定时器功能,使用到了类:org.springframework.scheduling.quartz.SchedulerFactoryBean,org.springframework.scheduling.quartz.CronTriggerBean,org.springframework.scheduling.quartz.MethodInvokingJobDetailFa
2014-12-05 15:07:58 601
原创 leetcode——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:
2014-12-04 14:38:04 487
原创 leetcode——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
2014-12-02 14:35:28 525
原创 leetcode——Spiral Matrix
题目:Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9
2014-12-01 14:44:47 512
原创 leetcode——Jump Game
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.De
2014-12-01 13:19:31 543
spring4.0.0.RELEASE全套jar包
2015-06-05
lucene 3.0.1 jar包
2015-01-09
一个音乐网站爬虫
2014-08-27
ja v a 泛型中的擦除问题
2014-11-24
TA创建的收藏夹 TA关注的收藏夹
TA关注的人