对树中的一个节点x,在先根序列中的序号为pre(x),在后根序列中的序号为post(z),若树中节点x是节点y的祖先,则下列4个序列中,()是正确的。
A:pre(x)>pre(y)和post(x)>post(y) B:pre(x)>pre(y)和post(x)<post(y) C:pre(x)<pre(y)和post(x)>post(y) D:pre(x)<pre(y)和post(x)<post(y)
在双向链表中删除指针p所指的结点(pre和next,是结点的指针域,pre指向结点的前驱,next指向结点的后继),则需要执行( )。
A:p↑.next:=p↑.pre;p↑.pre:=p; B:p↑.next↑.pre:=p↑.pre;p↑.pre↑.next:=p; C:p↑.pre:=p↑.next;p↑.next=p↑.pre; D:p↑.pre↑.next:=p↑.next;p↑.next↑.pre:=p↑.pre;
对树中的一个结点,在先根序列中序号为pre(x),在后根序列中序号为post(x),若树中 x是结点y的祖先,下列条件中正确的是 ______。
A:pre(x)<pre(y)和post(x)<post(y) B:pre(x)<pre(y)和post(x)>post(y) C:pre(x)>pre(y)和pos(x)<post(y) D:pre(x)>pre(y)和post(x)>post(y)
对树中的一个结点,在先根序列中序号为pre(x),在后根序列中序号为post(x),若树中x是结点y的祖先,下列条件中正确的是
A:pre(<pre(和post(<post( B:pre(<pre(和post(>post( C:pre(>pre(和post(<post( D:pre(>pre(和post(>post(
对树中的一个结点,在先根序列中序号为pre(x),在后根序列中序号为post(x),若树中 x是结点y的祖先,下列条件中正确的是 ______。
A:pre(<pre(和post(<post( B:pre(<pre(和post(>post( C:pre(>pre(和pos(<post( D:pre(>pre(和post(>post(
对树中的一个结点,在先根序列中序号为pre(x),在后根序列中序号为post(x),若树中x是结点y的祖先,下列条件中正确的是 ( )。
A:pre(x)<pre(y)和post(x)<post(y) B:pre(x)<pre(y)和post(x)>post(y) C:pre(x)>pre(y)和post(x)<post(y) D:pre(x)>pre(y)和post(x)>post(y)
对树中的一个结点,在先根序列中序号为 pre(x),在后根序列中序号为 post(x),若树中 x 是结点 y 的祖先,下列条件中正确的是______。
A:pre(x)< pre(y)和 post(x)< post(y) B:pre(x)< pre(y)和 post(x)> post(y) C:pre(x)> pre(y)和 post(x)< post(y) D:pre(x)> pre(y)和 post(x)> post(y)
对树中的一个结点,在先根序列中序号为pre(x),在后根序列中序号为post(x),若树中x是结点y的祖先,下列条件中正确的是 ( )。
A:pre(x)<pre(y)和post(x)<post(y) B:pre(x)<pre(y)和post(x)>post(y) C:pre(x)>pre(y)和post(x)<post(y) D:pre(x)>pre(y)和post(x)>post(y)