码迷,mamicode.com
首页 >  
搜索关键字:implement queue    ( 10759个结果
Java 中队列的使用
刚才看见群里的一个朋友在问队列的使用,确实在现实的写代码中非常少使用队列的,反正我是从来没使用过。仅仅是学数据结构的时候学过。以下是我写的一个小样例,希望有不足之处请提出改正。O(∩_∩)O~看代码:import java.util.LinkedList;import java.util.Queue...
分类:编程语言   时间:2014-07-09 21:42:55    阅读次数:232
java 关于extends 和implement的区别
在java中extends用于继承父类,只要父类不是声明为final或者为abstract类就可以,但是java不支持多重继承。可以使用接口实现多重继承implements,继承只能继承一个类,但implements可以实现多个接口,用逗号分开就行了比如class A extends B imple...
分类:编程语言   时间:2014-07-09 21:11:46    阅读次数:290
C++ Primer 学习笔记_85_模板与泛型编程 --模板特化[续]
模板与泛型编程--模板特化[续]三、特化成员而不特化类 除了特化整个模板之外,还能够仅仅特化push和pop成员。我们将特化push成员以复制字符数组,而且特化pop成员以释放该副本使用的内存:templatevoid Queue::push(const char *const &val){ ...
分类:编程语言   时间:2014-07-09 18:14:29    阅读次数:212
CTCI 2.6
Given a circular linked list, implement an algorithm which returns the node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) l...
分类:其他好文   时间:2014-07-09 15:24:22    阅读次数:203
android录制视屏(预览,倒计时)
android用mediarecord录制视屏,可以设置视屏格式,大小,还有拍摄前预览,倒计时功能要自己用hander做。 1,CameraPreview.java//预览classpublic class CameraPreview extends SurfaceView implement...
分类:移动开发   时间:2014-07-08 23:57:11    阅读次数:494
[leetcode] LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
分类:其他好文   时间:2014-07-08 22:54:28    阅读次数:287
Cracking the Coding Interview Q2.6
Given a circular linked list, implement an algorithm which returns node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) linke...
分类:其他好文   时间:2014-07-08 17:29:35    阅读次数:200
LeetCode——String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:其他好文   时间:2014-07-08 12:52:05    阅读次数:200
垃圾回收GC:.Net自动内存管理 上(三)终结器
GC提供了另外一个能够给你带来好处的功能:终结器。在一个资源被回收后,终结器允许一个优雅的清理操作。使用终结器,当GC释放资源所占的内存时,它们可以进行适当的自我清理。表面上,终结器看起来直接了当:你创建一个带终结器的对象,当它被回收时,终结器被调用。实际上,有更多的操作你看不到。...
分类:Web程序   时间:2014-07-08 10:54:07    阅读次数:318
CTCI 1.2
Since I mainly use Java, this problem seems meaning less for me to implement it with Java. Just use StringBuilder to append each character in string f...
分类:其他好文   时间:2014-07-06 13:33:34    阅读次数:296
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!