随笔分类 -  leetcode

摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * Source : https://oj.leetcode.com/problems/merge-intervals/ * * * Given a collec... 阅读全文
posted @ 2017-09-25 08:07 lacker 阅读(135) 评论(0) 推荐(0)
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Source : https://oj.leetcode.com/problems/spiral-matrix-ii/ * * Created by lverpeng on 2017/7/19. * * Given ... 阅读全文
posted @ 2017-09-18 08:04 lacker 阅读(143) 评论(0) 推荐(0)
摘要:``` import java.util.Arrays; /** * Source : https://oj.leetcode.com/problems/spiral-matrix/ * * Created by lverpeng on 2017/7/19. * * Given a matrix of m x n elements (m rows, n columns), return... 阅读全文
posted @ 2017-09-17 10:13 lacker 阅读(150) 评论(0) 推荐(0)
摘要:``` /** * * Source : https://oj.leetcode.com/problems/maximum-subarray/ * * Created by lverpeng on 2017/7/18. * * Find the contiguous subarray within an array (containing at least one number) *... 阅读全文
posted @ 2017-09-15 08:01 lacker 阅读(138) 评论(0) 推荐(0)
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Source : https://oj.leetcode.com/problems/n-queens/ * * Created by lverpeng on 2017/7/18. * * The n-queens p... 阅读全文
posted @ 2017-09-14 08:01 lacker 阅读(127) 评论(0) 推荐(0)
摘要:``` /** * Source : https://oj.leetcode.com/problems/powx-n/ * * Created by lverpeng on 2017/7/18. * * Implement pow(x, n). * */ public class Pow { /** * 实现x^n * 考虑n为负数 * 当n为... 阅读全文
posted @ 2017-09-13 08:01 lacker 阅读(133) 评论(0) 推荐(0)
摘要:``` import java.util.*; /** * * Source : https://oj.leetcode.com/problems/anagrams/ * * Created by lverpeng on 2017/7/18. * * Given an array of strings, group anagrams together. * * For examp... 阅读全文
posted @ 2017-09-11 23:05 lacker 阅读(116) 评论(0) 推荐(0)
摘要:``` import java.util.Arrays; / Source : https://oj.leetcode.com/problems/rotate image/ Created by lverpeng on 2017/7/18. You are given an n x n 2D mat 阅读全文
posted @ 2017-09-11 08:08 lacker 阅读(193) 评论(0) 推荐(0)
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Source : https://oj.leetcode.com/problems/permutations-ii/ * * Created by lverpeng on 2017/7/17. * * Given a... 阅读全文
posted @ 2017-09-08 08:31 lacker 阅读(138) 评论(0) 推荐(0)
摘要:``` /** * // Source : https://oj.leetcode.com/problems/jump-game-ii/ * * Created by lverpeng on 2017/7/17. * * Given an array of non-negative integers, you are initially positioned at the first i... 阅读全文
posted @ 2017-09-06 08:06 lacker 阅读(158) 评论(0) 推荐(0)
摘要:``` /** * Source : https://oj.leetcode.com/problems/jump-game/ * * Created by lverpeng on 2017/7/17. * * Given an array of non-negative integers, you are initially positioned at the first index o... 阅读全文
posted @ 2017-09-05 08:01 lacker 阅读(125) 评论(0) 推荐(0)
摘要:``` / Source : https://oj.leetcode.com/problems/trapping rain water/ Created by lverpeng on 2017/7/15. Given n non negative integers representing an e 阅读全文
posted @ 2017-09-04 07:58 lacker 阅读(215) 评论(0) 推荐(0)
摘要:``` / Source : https://oj.leetcode.com/problems/first missing positive/ Created by lverpeng on 2017/7/15. Given an unsorted integer array, find the fi 阅读全文
posted @ 2017-09-02 11:43 lacker 阅读(137) 评论(0) 推荐(0)
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** *Source : https://oj.leetcode.com/problems/combination-sum-ii/ * * Created by lverpeng on 2017/7/14. * * Given... 阅读全文
posted @ 2017-09-01 07:49 lacker 阅读(146) 评论(0) 推荐(0)
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Source : https://oj.leetcode.com/problems/combination-sum/ * * Created by lverpeng on 2017/7/14. * * Given a... 阅读全文
posted @ 2017-09-01 00:26 lacker 阅读(132) 评论(0) 推荐(0)
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; / Source : https://oj.leetcode.com/problems/count and say/ Created by 阅读全文
posted @ 2017-08-31 08:10 lacker 阅读(197) 评论(0) 推荐(0)
摘要:``` import java.util.Arrays; / Source : https://oj.leetcode.com/problems/search for a range/ Created by lverpeng on 2017/7/14. Given a sorted array of 阅读全文
posted @ 2017-08-30 08:34 lacker 阅读(158) 评论(0) 推荐(0)
摘要:``` import java.util.Arrays; / Source : https://oj.leetcode.com/problems/search for a range/ Created by lverpeng on 2017/7/14. Given a sorted array of 阅读全文
posted @ 2017-08-29 07:55 lacker 阅读(129) 评论(0) 推荐(0)
摘要:``` / Source : https://oj.leetcode.com/problems/search in rotated sorted array/ Created by lverpeng on 2017/7/13. Suppose a sorted array is rotated at 阅读全文
posted @ 2017-08-28 07:51 lacker 阅读(122) 评论(0) 推荐(0)
摘要:``` import java.util.Stack; / Source : https://oj.leetcode.com/problems/longest valid parentheses/ Created by lverpeng on 2017/7/13. Given a string co 阅读全文
posted @ 2017-08-27 12:27 lacker 阅读(152) 评论(0) 推荐(0)