自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (1)
  • 收藏
  • 关注

原创 [Leetcode] Remove Duplicates from Sorted Array II

Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5, with the first fi

2015-11-30 14:45:34 414

原创 Linked List Cycle

Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Floyd判圈算法的典型应用场景①使用Floyd判圈算法直接求解/** * Definition for singly-linked list.

2015-11-25 11:11:27 1013

原创 Floyd判圈算法理解

关于该算法,wiki上有详细说明。https://en.wikipedia.org/wiki/Cycle_detection#Tortoise_and_harehttps://zh.wikipedia.org/wiki/Floyd%E5%88%A4%E5%9C%88%E7%AE%97%E6%B3%95Floyd判圈算法(Floyd Cycle Detection Algorit

2015-11-24 18:16:24 6176 4

原创 Find Peak Element

A peak element is an 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 multiple peaks, i

2015-11-23 19:19:08 490

原创 ALPHA_8 RGB_565 ARGB_4444 ARGB_8888

Bitmap中定义了一个枚举结构:包含ALPHA_8,RGB_565,ARGB_4444,ARGB_8888,可用于一个Bitmap对象的不同配置。Bitmap.Config.ARGB_4444每个像素占4位,A=4,R=4,G=4,B=4,那么一个像素点占4+4+4+4=16位Bitmap.Config.ARGB_8888每个像素占8位,A=8,R=8,G=8,B=8,那么一

2015-11-23 17:17:23 2087 1

原创 adb命令

1. 写settings.secure表adb shell settings put secure adb_install_need_confirm 02. 读配置项adb shell getprop ro.config.ringtone3. 抓取实时logadb logcat -s tag:*4. 工厂级恢复出厂设置adb reboot resetfactory5. 用户级恢复出厂设置adb re

2015-11-17 23:13:28 4410

原创 内部类作用

1. 可以将只在一起使用的类从逻辑进行组合。如果一个类仅仅对另外一个类有用,那么就可以将这个类嵌入另外一个类中而使他们组合在一起。通过这种方式,可以使得自己的包更精简。2. 提高封装性。两个top level类A和B(B只需访问A中的私有成员),B放入A中,实现B访问A的私有成员,同时实现B和外界隔离。3. 变相多继承。在内部类定义多个继承其他类的内部类,并在外部类中定义各内部类对象,就变

2015-11-17 22:51:27 599

原创 Executors的工厂方法提供的5种不同的线程池

1、newFixedThreadPool() : 作用:该方法返回一个固定线程数量的线程池,该线程池中的线程数量始终不变,即不会再创建新的线程,也不会销毁已经创建好的线程,自始自终都是那几个固定的线程在工作,所以该线程池可以控制线程的最大并发数。 栗子:假如有一个新任务提交时,线程池中如果有空闲的线程则立即使用空闲线程来处理任务,如果没有,则会把这个新任务存在一个任务队列中,一旦有线程空闲

2015-11-17 18:51:00 3347 2

原创 [Leetcode] Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O

2015-11-11 16:40:19 389

原创 设置Theme为Theme.Dialog形式的Activity的宽和高

mDisplay = getWindowManager().getDefaultDisplay();DisplayMetrics outMetrics = new DisplayMetrics();mDisplay.getMetrics(outMetrics);LayoutParams layoutParams = getWindow().getAttributes();layoutPar

2015-11-10 15:19:49 1463

原创 [Leetcode] Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.方法一:假设链表长度为N,倒数第k处节点,对应正数第N+1

2015-11-03 15:50:14 998

html5与手机游戏的未来

大致简述html5和手机游戏开发的ppt

2012-04-05

空空如也

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

TA关注的人

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