正在加载图片...
stack:set of elements of type elemtype (elemtype is used to refer to the type of the individual elements in a stack. Elemtype can potentially be any defined type * Operations: procedure initialise(var S:stack); 数据结 This procedure assigns an empty stack to S. procedure push(var S:stack;a:elemtype); 构stack Stack S should not be full.This procedure adds the elemep the top of the stack. 的定义 procedure pop(var S:stack); 问题6:定义一 Stack S should not be empty.The top removed. 个数据结构,必 function top(S:stack):elemtype; 须定义哪些东西? Stack S should be non-empty and this fe element of the stack S.The stack S is left unc type is a structured type,this function should be rewren a procedure,see note 1 of section 3.1.) function empty(S:stack):boolean; This function returns true if S is empty and false otherwise. function full(S:stack):boolean; If S is full this function returns a true value. Otherwise it returns a false value.数据结 构stack 的定义 问题 6:定义一 个数据结构,必 须定义哪些东西?
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有