当前位置: 首页 > wzjs >正文

将一个网站拉入黑名单怎么做2345网址大全浏览器

将一个网站拉入黑名单怎么做,2345网址大全浏览器,阿里云网站备案,厦门微网站制作栈-Stack 1. 介绍2. 栈的实现2.1 基于链表的实现2.2 基于数组的实现 3. 栈操作CreateInitilizateDestoryPushPopTopEmptySize 1. 介绍 栈(stack) 是一种遵循先入后出逻辑的线性数据结构。顶部称为“栈顶”,底部称为“栈底”。把元素添加到栈…

栈-Stack

  • 1. 介绍
  • 2. 栈的实现
    • 2.1 基于链表的实现
    • 2.2 基于数组的实现
  • 3. 栈操作
    • Create
    • Initilizate
    • Destory
    • Push
    • Pop
    • Top
    • Empty
    • Size

1. 介绍

栈(stack) 是一种遵循先入后出逻辑的线性数据结构。顶部称为“栈顶”,底部称为“栈底”。把元素添加到栈顶的操作叫作“入栈”,删除栈顶元素的操作叫作“出栈”。
请添加图片描述

2. 栈的实现

2.1 基于链表的实现

请添加图片描述请添加图片描述请添加图片描述

2.2 基于数组的实现

请添加图片描述请添加图片描述
请添加图片描述

3. 栈操作

Create

typedef int STDataType;
typedef struct Stack
{STDataType* a;int top;int capacity;
}ST;

Initilizate

void STInit(ST* pst) {assert(pst);pst->a = NULL;//pst->top = -1;// top Points to the top of the stackpst->top = 0;// top Points to the next data on the top of the stackpst->capacity = 0;
}

Destory

void STDestory(ST* pst) {assert(pst);free(pst->a);pst->top = pst->capacity = 0;
}

Push

void STPush(ST* pst, STDataType x) {// Enpend capacityif (pst->top == pst->capacity) {int newCapacity = pst->capacity == 0 ? 4 : pst->capacity * 2;// If memblock is NULL, realloc behaves the same way as malloc and allocates a new block of size bytes. STDataType* tmp = (STDataType*)realloc(pst->a, newCapacity * sizeof(STDataType));if (tmp == NULL) {perror("relloc fail");return;}pst->a = tmp;pst->capacity = newCapacity;}pst->a[pst->top] = x;pst->top++;
}

Pop

void STPop(ST* pst) {assert(pst);assert(!STEmpty(pst));pst->top--;
}

Top

STDataType STTop(ST* pst) {assert(pst);assert(!STEmpty(pst));// top Points to the next data on the top of the stackreturn pst->a[pst->top - 1];
}

Empty

bool STEmpty(ST* pst) {assert(pst);return pst->top == 0;
}

Size

int STSize(ST* pst) {assert(pst);return pst->top;
}
http://www.dtcms.com/wzjs/401030.html

相关文章:

  • 东莞中小企业网站制作建立企业网站步骤
  • 江苏省住房和城乡建设委员会网站百度官方网站首页
  • 重庆网站建设招聘网络营销和网站推广的区别
  • 政府网站建设先进个人网上卖货的平台有哪些
  • 牛 网站建设广告seo是什么意思
  • 厦门外贸网页设计服务株洲百度seo
  • 企业网站如何做架构图百度导航下载2022最新版官网
  • 买东西网站建设北京网站优化校学费
  • 北京垡头网站建设公司网店代运营靠谱吗
  • 如何查询网站是否备案b2b网站平台有哪些
  • 有教做翻糖的网站吗百度站长工具抓取诊断
  • 专业返利网站建设肇庆seo排名
  • b2b网站大全 黄页大全网站维护的内容有哪些
  • 公司优化网站的案例如何宣传自己的网站
  • 赤壁市药监局网站建设方案广东省最新新闻
  • 宁波高端网站设计价格永久免费用的在线客服系统
  • wordpress收费主题论坛深圳防疫措施优化
  • nas可以做网站今日实时热点新闻事件
  • 莱芜吧百度贴吧杭州百度优化
  • html5 手机网站开发教程网站内部seo优化包括
  • 淘宝美工网站怎么做公司网站费用
  • 牛b叉网站建设微博搜索引擎优化
  • 上海建网站计划百度总部
  • 南通网站建设空间站长之家的作用
  • 网站搭建软件推广活动策划方案范文
  • 设计网站公司的账务处理排名优化课程
  • 动态网站开发的集成软件有哪些网络推广的几种方式
  • 东莞企业网站推广技巧各大网站收录提交入口
  • 如何做网站结构优化天津seo选天津旗舰科技a
  • 网站要实名认证吗珠海网站建设优化