计算机专业英语(第二版)孙建忠电子教案 Chapter4.ppt

计算机专业英语(第二版)孙建忠电子教案 Chapter4.ppt

  1. 1、本文档共32页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Computer English Chapter 4 Elementary Data Structures * * Key points: useful terms and definitions of data structure Difficult points: Stack, queue, tree Requirements: The properties of Stack, Queue, and Linked lists 掌握常用英汉互译技巧 New Words Expressions: stack n. 栈,堆栈 queue n. 队列 attribute n. 属性,性质 underflow n. 下溢 overflow n. 上溢 pseudocode n. 伪码 4.1 Stacks and queues Abbreviations: LIFO(last in first out)后进先出 FIFO(fisrt in first out)先进先出 4.1 Stacks and queues Stacks and queues are dynamic sets in which the element removed from the set by the DELETE operation is prespecified. In a stack, the element deleted from the set is the one most recently inserted: the stack implements a last-in, first-out, or LIFO, policy. Similarly, in a queue, the element deleted is always the one that has been in the set for the longest time: the queue implements a first-in, first out, or FIFO, policy. There are several efficient ways to implement stacks and queues on a computer. In this section we show how to use a simple array to implement each. 栈和队列都是动态的集合,其中的元素由预先定义的删除操作可将其去除。在栈中,最近被插入的元素最先被删除,即栈是按后进先出(LIFO)的原则进行的;类似的,在队列里,被删除的元素是最早进入队列的,即队列是以先进先出(FIFO)的原则进行的。在计算机上,对于栈和队列有几种有效的实现方法,这一节我们给出如何用简单的数组来实现它们。 4.1 Stacks and queues 4.1.1 Stacks The INSERT operation on a stack is often called PUSH, and the DELETE operation, which does not take an element argument, is often called POP. These names are allusions to physical stacks, such as the spring-loaded stacks of plates used in cafeterias. The order in which plates are popped from the stack is the reverse of the order in which they were pushed onto the stack, since only the top plate is accessible. 栈中插入元素的操作通常称为入栈(PUSH),删除操作称为出栈(POP),这里不考虑删除的那个元素。这些名字来源于实际的堆栈,就像餐厅里使用的带有弹簧座的一叠盘子:因为只有顶部的盘子是方便取用,所以盘子从这一叠中取出的顺序与其被放入的顺序是相反的。 4.1 Stacks and queues 4.1.2 Queues We call the INSERT operation on a queue ENQUEUE, and we call the DELETE operation DEQUEUE; like the stack operation POP, DEQUEUE takes no element argument. The FIFO

文档评论(0)

时间加速器 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档