码迷,mamicode.com
首页 >  
搜索关键字:stack    ( 9691个结果
算术表达式
#include #include #include #include #define MAXzhansize 30 char stack[MAXzhansize];// char deleted(int *top); void add(int *top,char item); //////////////////////////////////////////////////////...
分类:其他好文   时间:2015-07-07 16:53:12    阅读次数:103
转盘不转动的问题
Stack Overflow is a question and answer site for professional and enthusiast programmers. It‘s 100% free, no registration required. jQuery Rotate - IE7 & IE8 Issues up vote 11 down vote favorite 3 ...
分类:其他好文   时间:2015-07-07 11:16:10    阅读次数:182
Leetcode 232 Implement Queue using Stacks 和 231 Power of Two
1. 232 Implement Queue using Stacks1.1 问题描述  使用栈模拟实现队列。模拟实现如下操作:    push(x). 将元素x放入队尾。 pop(). 移除队首元素。 peek(). 获取队首元素。 empty(). 判断队列是否为空。 注意:只能使用栈的标准操作,push,pop,size和empty函数。1.2 方法与思路   本题和用队列实现栈思路一样,设...
分类:其他好文   时间:2015-07-07 11:07:50    阅读次数:112
225 Implement Stack using Queues
这道题一般既可以用一个queue也可以用2个queue来解决 这里使用一个queue来解决 代码如下class Stack: # initialize your data structure here. def __init__(self): self.stack = []...
分类:其他好文   时间:2015-07-07 07:04:48    阅读次数:113
LeetCode "Implement Queue using Stacks"
Very similar as "Implement Stack using Queues".class Queue { stack _s0; stack _s1; int _front; public: // Push element x to the back of...
分类:其他好文   时间:2015-07-07 07:03:55    阅读次数:112
[LeetCode] Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:其他好文   时间:2015-07-06 23:17:01    阅读次数:129
List,Set,Map用法以及区别
List,Set,Map用法以及区别博客分类:JavaList,Set,Map是否继承自Collection接口?答:List,Set是,Map不是。如图: Collection ├List │├LinkedList │├ArrayList │└Vector │ └Stack └Set ...
分类:其他好文   时间:2015-07-06 14:10:45    阅读次数:110
JVM
先看一下JVM的内存模型: ? ? 从大的方面来讲,JVM的内存模型分为两大块: ? 永久区内存(?Permanent space?)和堆内存(heap space)。 ? 栈内存(stack space)一般都不归在JVM内存模型中,因为栈内存属于...
分类:其他好文   时间:2015-07-06 12:36:37    阅读次数:105
D3js-堆栈图
效果图: 源代码: "> D3 -堆栈图 ...
分类:Web程序   时间:2015-07-06 10:17:48    阅读次数:240
链栈基本操作
栈基本概念: 栈(stack)是限定在表尾进行插入和删除操作的线性表(或单链表)。 //只能在一段进行插入和删除,因此不存在,在中间进行插入 栈顶(top):允许插入和删除的一端。而另一端称为栈底(bottom) 空栈:不含任何数据元素的栈。 后进先出两个基本操作: 栈的插入操作(push),叫做进栈,或压栈,或入栈 删除操作(pop),叫做出栈,或弹栈 注意链栈next指针的指向,...
分类:其他好文   时间:2015-07-05 21:18:25    阅读次数:133
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!