自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 【Leetcode】Merge intervals

【题目】Given a collection ofintervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].【思路】思路就是,先对进来的这一个list 的inteval进行比较,排序,排序的时候

2015-08-31 22:31:50 231

转载 【Leetcode】Rotate Image

【题目】You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).【思路】The idea was firstly transpose the matrix and then flip it symmetrically.

2015-08-26 14:31:59 243

转载 【Leetcode】Jump Game 1,2

【题目】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.You

2015-08-26 10:27:45 268

转载 【Leetcode】Rain trapping

【题目】 Given n non-negative integers representing anelevation map where the width of each bar is 1, compute how much water it isable to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1

2015-08-25 22:18:54 326

转载 【Leetcode】First Missing Positive

【题目】Given an unsortedinteger array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and us

2015-08-24 23:21:41 276

转载 【Leetcode】Combination sum 1,2

【题目】【分析】首先,先sort,如果target > 0:【代码】using recursive 这恐怕的 O(n2)...过程:before recursion : [2]before recursion : [2, 2]before recursion : [2, 2, 2]after recursion and remove :

2015-08-24 16:47:10 323

转载 【Leetcode】Search for a range

【题目】【思路】The problem can be simply broken down as two binary searches for the begining and end of the range, respectively:First let's find the left boundary of the range. We ini

2015-08-23 21:09:39 260

转载 【Eclipse】Eclipse快捷键总结

Eclipse中10个最有用的快捷键组合 一个Eclipse骨灰级开发者总结了他认为最有用但又不太为人所知的快捷键组合。通过这些组合可以更加容易的浏览源代码,使得整体的开发效率和质量得到提升。    1. ctrl+shift+r:打开资源    这可能是所有快捷键组合中最省时间的了。这组快捷键可以让你打开你的工作区中任何一个文件,而你只需要按下文件名或mask名中的前几个字母,比如a

2015-08-13 16:33:20 313

转载 【Leetcode】Largest Number

【题目】Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is9534330.Note: The result may

2015-08-03 21:38:34 257

转载 【Leetcode】Reorder List

【题目】Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it

2015-08-03 20:21:03 242

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除