中国大学MOOC: 下列描述括号匹配的文法中,属于LL(1)文法的有______。(1)S->(SS’|ε S’->)|ε (2)S->(S)S|ε(3)S->S(S)S|ε(4)S->(S|S’ S’->(S’)|ε
中国大学MOOC: 下列描述括号匹配的文法中,属于LL(1)文法的有______。(1)S->(SS’|ε S’->)|ε (2)S->(S)S|ε(3)S->S(S)S|ε(4)S->(S|S’ S’->(S’)|ε
下列描述括号匹配的文法中,属于LL(1)文法的有______。(1)S->(SS’|ε S’->)|ε (2)S->(S)S|ε(3)S->S(S)S|ε(4)S->(S|S’ S’->(S’)|ε A: (1) B: (2) C: (3) D: (4)
下列描述括号匹配的文法中,属于LL(1)文法的有______。(1)S->(SS’|ε S’->)|ε (2)S->(S)S|ε(3)S->S(S)S|ε(4)S->(S|S’ S’->(S’)|ε A: (1) B: (2) C: (3) D: (4)
在循环双链表的P所指节点之后插入s所指节点的操作是( ) A: p->next=s; s->prior=p; p->next->prior=s; s->next=p->next; B: p->next=s; p->next->prior=s; s->prior=p; s->next=p->next; C: s->prior=p; s->next=p->next; p->next=s; p->next->prior=s; D: s->prior=p; s->next=p->next; p->next=s;p->next->prior=s;
在循环双链表的P所指节点之后插入s所指节点的操作是( ) A: p->next=s; s->prior=p; p->next->prior=s; s->next=p->next; B: p->next=s; p->next->prior=s; s->prior=p; s->next=p->next; C: s->prior=p; s->next=p->next; p->next=s; p->next->prior=s; D: s->prior=p; s->next=p->next; p->next=s;p->next->prior=s;
在循环双链表的p所指结点之后插入s结点的操作是( ) A: p->next=s; s->pre=p; p->next->pre=s; s->next=p->next; B: p->next=s; p->next->pre=s; s->pre=p; s->next=p->next; C: s->pre=p; s->next=p->next; p->next->pre=s; p->next=s; D: s->pre=p; s->next=p->next; p->next=s; p->next->pre=s;
在循环双链表的p所指结点之后插入s结点的操作是( ) A: p->next=s; s->pre=p; p->next->pre=s; s->next=p->next; B: p->next=s; p->next->pre=s; s->pre=p; s->next=p->next; C: s->pre=p; s->next=p->next; p->next->pre=s; p->next=s; D: s->pre=p; s->next=p->next; p->next=s; p->next->pre=s;
在循环双链表的P所指结点之后插入S所指结点的操作是( ) A: P->right=S;P->fight->left=S:S->left=P;S->fight=P->right B: P->fight=S;S->left=P;P->fight->left=S;S->fight=P->fight C: S->left=P;S->right=P->right;P->fight=S;P->right->left=S D: S->left=P;S->right=P->right;P->right->left=S;P->right=S
在循环双链表的P所指结点之后插入S所指结点的操作是( ) A: P->right=S;P->fight->left=S:S->left=P;S->fight=P->right B: P->fight=S;S->left=P;P->fight->left=S;S->fight=P->fight C: S->left=P;S->right=P->right;P->fight=S;P->right->left=S D: S->left=P;S->right=P->right;P->right->left=S;P->right=S
在循环双链表的p所指结点后插入s所指结点的操作是( )。 A: s->prior=p; s->next=p->next; p->next=s; p->next->prior=s; B: p->next=s; p->next->prior=s; s->prior=p; s->next=p->next; C: p->next=s; s->prior=p; p->next->prior=s; s->next=p->next; D: s->prior=p; s->next=p->next; p->next->prior=s; p->next=s;
在循环双链表的p所指结点后插入s所指结点的操作是( )。 A: s->prior=p; s->next=p->next; p->next=s; p->next->prior=s; B: p->next=s; p->next->prior=s; s->prior=p; s->next=p->next; C: p->next=s; s->prior=p; p->next->prior=s; s->next=p->next; D: s->prior=p; s->next=p->next; p->next->prior=s; p->next=s;
下列文法哪个是左递归的? A: G[S]: S->aSb|a B: G[S]: S->Sa|a C: G[S]: S->aS|a D: G[S]: S->Ab|a A->Bb|c B->Sc|d
下列文法哪个是左递归的? A: G[S]: S->aSb|a B: G[S]: S->Sa|a C: G[S]: S->aS|a D: G[S]: S->Ab|a A->Bb|c B->Sc|d
在循环双链表的p所指的结点之前插入s所指结点的操作是 ( ) A: p->;prior = s;s->;next = p;p->;prior->;next = s;s->;prior = p->;prior; B: p->;prior = s;p->;prior->;next = s;s->;next = p;s->;prior = p->;prior; C: s->;next = p;s->;prior = p->;prior;p->;prior = s;p->;prior->;next = s; D: s->;next = p;s->;prior = p->;prior;p->;prior->;next = s;p->;prior = s;
在循环双链表的p所指的结点之前插入s所指结点的操作是 ( ) A: p->;prior = s;s->;next = p;p->;prior->;next = s;s->;prior = p->;prior; B: p->;prior = s;p->;prior->;next = s;s->;next = p;s->;prior = p->;prior; C: s->;next = p;s->;prior = p->;prior;p->;prior = s;p->;prior->;next = s; D: s->;next = p;s->;prior = p->;prior;p->;prior->;next = s;p->;prior = s;
在循环双链表的p所指结点之后插入s所指结点的操作是_____。 A: p->right=s; s->left=p; p->right->left=s; s=->right=p->right; B: p->right=s; p->right->left=s; s->left=p; s->right=p->right; C: s->left=p; s->right= p->right; p->right=s; p->right->left=s; D: s->left=p; s->right=p->right; p->right->left=s; p->right=s;
在循环双链表的p所指结点之后插入s所指结点的操作是_____。 A: p->right=s; s->left=p; p->right->left=s; s=->right=p->right; B: p->right=s; p->right->left=s; s->left=p; s->right=p->right; C: s->left=p; s->right= p->right; p->right=s; p->right->left=s; D: s->left=p; s->right=p->right; p->right->left=s; p->right=s;
二叉排序树采用二叉链表存储,结点结构为:lchild|data|rchild,指针lchild和rchild分别指向结点的左右孩子结点。令T指向根结点,则求T的左子树上最大的结点算法的核心语句是( )。 A: if (T) { s=T->lchild;if (s) { while(s->rchild) s=s->rchild; }}return s; B: if (T) { s=T->rchild;if (s) { while(s->rchild) s=s->rchild; }}return s; C: if (T) { s=T->rchild;if (s) { while(s->lchild) s=s->lchild; }}return s; D: if (T) { s=T->lchild;if (s) { while(s->lchild) s=s->lchild; }}return s;
二叉排序树采用二叉链表存储,结点结构为:lchild|data|rchild,指针lchild和rchild分别指向结点的左右孩子结点。令T指向根结点,则求T的左子树上最大的结点算法的核心语句是( )。 A: if (T) { s=T->lchild;if (s) { while(s->rchild) s=s->rchild; }}return s; B: if (T) { s=T->rchild;if (s) { while(s->rchild) s=s->rchild; }}return s; C: if (T) { s=T->rchild;if (s) { while(s->lchild) s=s->lchild; }}return s; D: if (T) { s=T->lchild;if (s) { while(s->lchild) s=s->lchild; }}return s;