网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
I ________ twenty night next week.

A. am

B. is

C. will be

D. was


参考答案

更多 “ I ________ twenty night next week. A. amB. isC. will beD. was ” 相关考题
考题 —As you know, I’m not quite familiar with how to shop online. —It’s a piece of cake! I’ll show you how to do it.() A.First of all, you should find a good e-commerce site.B.Next, add the items in your shopping cart and place the order.C.Then compare the prices and features of the goods you like.

考题 运行以下程序段后,输出结果为【 】。For I=1 To 3CisPrint"I=",I;Next

考题 执行下列语句后指针及链表的示意图为(43)。L = (LinkList) malloc ( sizeof (LNode) );P = L;for(i =0;i <=3;i ++) {P→next = (LinkList) malloc (sizeof (LNode));P = P→next;P→data = i * i + 1;}A.B.C.D.

考题 ●试题二阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。【说明】该程序运行后,输出下面的数字金字塔【程序】includestdio.hmain (){char max,next;int i;for(max=′1′;max=′9′;max++){for(i=1;i=20- (1) ;++i)printf(" ");for(next= (2) ;next= (3) ;next++)printf("%c",next);for(next= (4) ;next= (5) ;next--)printf("%c",next);printf("\n");}}

考题 阅读下列说明和C代码,回答问题1至问题3,将解答写在答题纸的对应栏内。 【说明】 模式匹配是指给定主串t和子串s,在主串t中寻找子串s的过程,其中s称为模式。如果匹配成功,返回s在t中的位置,否则返回-1 。 KMP算法用next数组对匹配过程进行了优化。KMP算法的伪代码描述如下: 1.在串t和串s中,分别设比较的起始下标i=j=0。 2.如果串t和串s都还有字符,则循环执行下列操作: (1)如果j=-l或者t[i]=s[j],则将i和j分别加1,继续比较t和s的下一个字符; (2)否则,将j向右滑动到next[j]的位置,即j =next[j]。 3.如果s中所有字符均已比较完毕,则返回匹配的起始位置(从1开始);否则返回-1. 其中,next数组根据子串s求解。求解next数组的代码已由get_next函数给出。【C代码】 (1)常量和变量说明 t,s:长度为悯铂Is的字符串 next:next数组,长度为Is (2)C程序 #include #include #include /*求next[]的值*/ void get_next( int *next, char *s, int Is) { int i=0,j=-1; next[0]=-1;/*初始化next[0]*/ while(i if(j==-1l ls[i]==s[j]){/*匹配*/ j++; i++; if( s[i]==s[j]) next[i] = next[j]; else Next[i] = j; } else j = next[j]; } } int kmp( int *next, char *t ,char *s, int lt, int Is ) { Int i= 0,j =0 ; while (i if( j==-1 || (2) ){ i ++ ; j ++ ; } else (3) ; } if (j >= ls) return (4) ; else return -1; } 【问题1】(8分) 根据题干说明,填充C代码中的空(1)~(4). 【问题2】(2分) 根据题干说明和C代码,分析出kmp算法的时间复杂度为(5)(主串和子串的长度分别为It和Is,用O符号表示)。 【问题3】(5分) 根据C代码,字符串“BBABBCAC”的next数组元素值为(6)(直接写素值,之间用逗号隔开)。若主串为“AABBCBBABBCACCD”,子串为“BBABBCAC”,则函数Kmp的返回值是(7)。

考题 在KMP模式匹配中,用next数组存放模式串的部分匹配信息。当模式串位j与目标串位i比较时,两字符不相等,则j的位移方式是()。A.i=next[j]B.i不变C.j不变D.j=next[j]

考题 在KMP模式匹配中,用next数组存放模式串的部分匹配信息。当模式串位j与目标串位i比较时,两字符不相等,则i的位移方式是()。A.i=next[j]B.i不变C..j不变D.j=next[j]

考题 以下用课本中Lnode节点类为单链表类定义定点插入元素方法,请填空 def ins_pos(self,elem,i): q=LNode(elem,None) p=self.head while p is not None and i>0: i-=1 ___________________ q.next=p.next ___________________ self._num+=1

考题 L1是不带头结点的单链表。以下算法功能是什么? Status fun(LinkList L1, LinkList L2) {p=L1; n=0; while(p){n++; p=p->next;} p=L1; for(i=1;i<n/2;i++)p=p->next; L2=p->next; p->next=NULL; return OK; }

考题 下面语句执行后,变量w中的值是____。 w=Choose(2 , "Morning", "Afternoon", "Day", "Night",)A.MorningB.AfternoonC.DayD.Night