码迷,mamicode.com
首页 >  
搜索关键字:peek    ( 239个结果
3D Touch:静态快速启动方式
原文传送门:Add iOS 9’s Quick Actions shortcut support in 15 minutes right now !苹果在iOS9 上引入3D触控(压力触控)功能,API 主要分为三个模块:快速启动、Peek 和 Pop,压敏技术。该新功能在iOS9 中你默认是有效的...
分类:其他好文   时间:2015-09-21 01:28:05    阅读次数:222
[LeetCode#253] Meeting Rooms II
Problem:Given an array of meeting time intervals consisting of start and end times[[s1,e1],[s2,e2],...](si= min_heap.peek()) { min_heap.poll(); ...
分类:其他好文   时间:2015-09-13 13:18:35    阅读次数:634
11.双栈排序
题目描述:按升序对栈进行排序(最大元素位于栈顶)。最多只能使用一个额外的栈存放临时数据,但不得将元素复制到别的数据结构中(如数组)。该栈支持如下操作:push、pop、peek、isEmpty.代码如下:解析参考编程金典p144页public Stacksort(Stacks){ Stackrt.....
分类:编程语言   时间:2015-08-27 00:00:14    阅读次数:469
LeetCode-Implement Queue using Stacks
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empt...
分类:其他好文   时间:2015-08-13 22:28:14    阅读次数:99
[leetcode 234]Implement Queue using Stacks
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empty(...
分类:其他好文   时间:2015-08-08 21:26:15    阅读次数:94
9.3栈和队列(七)——用两个栈来实现一个队列
/**  * 功能:用两个栈来实现一个队列。  */ import java.util.*; /** * 思路:需要修改peek()和pop(),以相反顺序执行操作。可以利用第二个栈来反转元素的次序。 * stackNewest顶端为最新元素,stackOldest顶端为最旧元素,利用两个栈的元素的转移来实现。 * */ public class MyQuene1 { ...
分类:其他好文   时间:2015-08-04 19:26:51    阅读次数:132
[LeetCode]232.Implement Queue using Stacks
题目Implement the following operations of a queue using stacks.push(x) – Push element x to the back of queue. pop() – Removes the element from in front of queue. peek() – Get the front element. empty(...
分类:其他好文   时间:2015-08-01 10:08:20    阅读次数:120
LeetCode232——Implement Queue using Stacks
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empty(...
分类:其他好文   时间:2015-07-31 18:29:47    阅读次数:93
Java中的queue和deque
队列(queue)是一种常用的数据结构,可以将队列看做是一种特殊的线性表,该结构遵循的先进先出原则。Java中,LinkedList实现了Queue接口,因为LinkedList进行插入、删除操作效率较高 相关常用方法: boolean offer(E e):将元素追加到队列末尾,若添加成功则返回true。 E poll():从队首删除并返回该元素。 E peek():返回队首元素,但是不删...
分类:编程语言   时间:2015-07-25 08:22:07    阅读次数:547
LeetCode Implement Queue using Stacks
Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empty() --...
分类:其他好文   时间:2015-07-21 17:22:00    阅读次数:109
239条   上一页 1 ... 17 18 19 20 21 ... 24 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!