chapter_stack_and_queue/summary/ #58
Replies: 16 comments 5 replies
-
K神!!~能否写个优先队列呢 |
Beta Was this translation helpful? Give feedback.
-
浏览器的「前进」与「后退」是不是和撤销(undo)和反撤销(redo)同理,使用两个堆栈实现的? |
Beta Was this translation helpful? Give feedback.
-
DAY4,双向队列里实现「出入队列」的方法加入 isFront 的判断,这样的tips很妙啊 |
Beta Was this translation helpful? Give feedback.
-
请问“如果后续仍需要使用弹出节点,则不需要释放内存。若之后不需要用到,Java 和 Python 等语言拥有自动垃圾回收机制,因此不需要手动释放内存;在 C 和 C++ 中需要手动释放内存。“中,C++手动释放栈道内存在代码中怎么体现呢?直接delete stack吗? |
Beta Was this translation helpful? Give feedback.
-
5.14 finish |
Beta Was this translation helpful? Give feedback.
-
栈和队列都可以由数组或者链表形成,数组形成栈的栈顶在上方,栈底在下方,而数组头在下面,数组尾在上面。链表的表头对应栈头,链尾对应栈尾。数组形成的队列的头指针指向队首元素,尾指针指向队尾元素的下一个位置,链表形成的队列头指针指向头节点,尾指针指向尾节点。队列入队是从队尾进,栈入栈是从栈顶进 |
Beta Was this translation helpful? Give feedback.
-
2024.5.02打卡! |
Beta Was this translation helpful? Give feedback.
-
现代浏览器应该主要使用双栈结构,具体的操作流程如下: 访问新页面: 点击后退: 点击前进: |
Beta Was this translation helpful? Give feedback.
-
chapter_stack_and_queue/summary/
Your first book to learn Data Structure And Algorithm.
https://www.hello-algo.com/chapter_stack_and_queue/summary/
Beta Was this translation helpful? Give feedback.
All reactions