带链栈空的条件是( )。

admin2022-09-09  17

问题 带链栈空的条件是(          )。

选项 A、top=bottom=NULL
B、top=﹣1且bottom=NULL
C、top=NULL且bottom=﹣1
D、top=bottom=﹣1

答案A

解析 在带链栈中,只会出现栈空和非空两种状态。当栈空时,top=bottom=NULL;当栈非空时,top指向链表的第一个节点(栈顶)。本题选择A选项。
转载请注明原文地址:https://kaotiyun.com/show/Hp6p777K
0

最新回复(0)