type
status
date
slug
summary
tags
category
icon
password

基本概念

定义

  • 栈是遵循后进先出(LIFO)原则的线性数据结构。
    • 栈顶(Top)栈底(Bottom)的结构,并且只在top位置进行操作
      • notion image
    • 它的行为就像是一堆盘子,最后添加的盘子是第一个被移除的。
      • notion image

栈的基本操作:

  • Init():初始化栈
  • Destroy():销毁栈并且释放空间
  • Push(data):将一个元素添加到栈顶。
  • Pop():从栈中删除顶部元素。
  • Top():返回顶部元素而不删除它。
  • Size():返回栈的容量大小
  • IsEmpty():检查堆栈是否为空。
  • IsFull():检查堆栈是否已满(如果是固定大小的数组)。
notion image

存储结构

分为顺序存储结构链式存储结构
这个部分放在代码编程中描述

📎 参考文章

  • 引用视频
  1. Introduction to Stacks and Queues (Data Structures & Algorithms #12)(YouTube)
  1. Introduction to Stacks(Youtube)
  • 引用文章
  1. Stack Data Structure
哈希表-相关题目(持更中)栈-代码编程
  • Cusdis
  • Utterance
Chailyn
Chailyn
I will always be loyal to myself running towards ideal and freedom.
Announcement
🎉欢迎来到我的homepage🎉
-- 感谢您的支持 ---
吾生也有涯,而知也无涯
旅行记录,与你分享路过的风景
知识无价,学术blog上希望能帮到你
-- 祝您所遇皆温柔,所感皆太阳 --
更新(2025.2.4):
更新文章 “再见啦,T.W.O酒店(I)”
 
 
2024-2025 Chailyn.

ChailynCui BLOG | I will always be loyal to myself running towards ideal and freedom.

Powered by NotionNext 4.3.1.