当前位置:网站首页>数组模拟栈
数组模拟栈
2022-06-22 16:58:00 【安德伍德之心】
#include <iostream>
using namespace std;
const int N = 100010;
int stk[N], tt;
//插入
void push(int x)
{
stk[++tt] = x;
}
//弹出
void pop()
{
tt--;
}
//判断栈是否为空
bool isEmpty()
{
if(tt>0) return false;
else return true;
}
//获得栈顶,不弹出
int pop()
{
return skt[tt];
}
边栏推荐
- The principle of locality in big talk
- 利用Inkscape转换为dxf文件的正确方法 svg导出dxf文件
- DAP事实表加工汇总功能应用说明
- The world's first AR contact lens, the entrance of metauniverse is really opened this time?
- High voltage direct current (HVDC) model based on converter (MMC) technology and voltage source converter (VSC) (implemented by MATLAB & Simulink)
- Mybaits: interface proxy implementation Dao
- Kibana+elk cluster log processing
- Ad20/altium Designer - oil for manhole cover
- 详解openGauss多线程架构启动过程
- 当线上线下的融合加速,当信息对接渠道的多样化,传统意义上的中心将没有必要
猜你喜欢

Activity启动流程梳理

docker: Error response from daemon: Conflict. The container name “/mysql“ is already in use by conta

缺失值处理

imx6ull的GPIO操作方法

Using stream API instead of SQL

The world's first AR contact lens, the entrance of metauniverse is really opened this time?

SOA面向服务的架构

知乎热问:一个程序员的水平能差到什么程度?

Activity start process sorting

Behind the fall of the first Seberg: the extreme race between technology and frostbite
随机推荐
Binary tree practice the second bullet
Filebeat收集日志数据传输到Redis,通过Logstash来根据日志字段创建不同的ES索引
传统图像--LBP特征
测试组的任务职责和测试的基本概念
啊哈C语言 第6章 天啊 一大串数正在接近(第26讲)
Jenkins容器安装ruby-runtime插件失败报错解决
How to do well in R & D efficiency measurement and index selection
JSP learning (I) -- overview of JSP
Network intelligent operation and maintenance helps improve operation and maintenance efficiency
不断重修的计划与变化
知乎热问:一个程序员的水平能差到什么程度?
How does flynk MySQL CDC guarantee the server_ Is the ID globally unique?
游戏NFT市场:OpenSea最易被切下的蛋糕
azkaban启动报错 2022/06/20 21:39:27.726 +0800 ERROR [StdOutErrRedirect] [Azkaban] Exception in thread “m
How can the new generation of HTAP databases be reshaped in the cloud? Tidb V6 online conference will be announced soon!
第四届青年生命科学论坛 | 第一轮通知
请问一下,CDC2.0在读取mysql的时候,应该是没有表锁了吧,刚刚报了一个错误,access d
TypeScript(7)泛型
DAP事实表加工汇总功能应用说明
Mybaits: common database operations (Neusoft operations)