随笔分类 - 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...
阅读全文
摘要:``` 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 ...
阅读全文
摘要:``` 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...
阅读全文
摘要:``` /** * * 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) *...
阅读全文
摘要:``` 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...
阅读全文
摘要:``` /** * 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为...
阅读全文
摘要:``` 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...
阅读全文
摘要:``` 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
阅读全文
摘要:``` 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...
阅读全文
摘要:``` /** * // 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...
阅读全文
摘要:``` /** * 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...
阅读全文
摘要:``` / Source : https://oj.leetcode.com/problems/trapping rain water/ Created by lverpeng on 2017/7/15. Given n non negative integers representing an e
阅读全文
摘要:``` / Source : https://oj.leetcode.com/problems/first missing positive/ Created by lverpeng on 2017/7/15. Given an unsorted integer array, find the fi
阅读全文
摘要:``` 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...
阅读全文
摘要:``` 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...
阅读全文
摘要:``` import java.util.ArrayList; import java.util.Arrays; import java.util.List; / Source : https://oj.leetcode.com/problems/count and say/ Created by
阅读全文
摘要:``` 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
阅读全文
摘要:``` 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
阅读全文
摘要:``` / 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
阅读全文
摘要:``` import java.util.Stack; / Source : https://oj.leetcode.com/problems/longest valid parentheses/ Created by lverpeng on 2017/7/13. Given a string co
阅读全文

浙公网安备 33010602011771号