3单选若串S1=‘ABCDEFG’,S2=‘9898’,S3=‘###’,S4=‘012345’,执行concat(replace(S1,substr(S1,length(S2),length(S3)),S3),substr(S4,index(S2,‘8’),length(S2)))注意:substr(S,i,j)是对字符串S的下标为i开始取j个字符,这里的下标是从0开始的(单选)IfthestringS1=’ABCDEFG’,S2=’9898′,S3=’###’,S4=’012345′,executeconcat(replace(S1,substr(S1,length(S2),length(S3)),S3),substr(S4,index(S2,’8′),length(S2)))Notesubstr(S,i,j)istheoperationtotakestringS’sjcharactersfromsubscripti.Subscripthereisstartingfrom0.(Thereisonlyonecorrectanswer)
A.ABC###G2345
B.ABCD###2345
C.ABC###G0123
D.ABCD###1234
4单选下面关于串的的叙述中,哪一个是不正确的:(单选)Whichofthefollowingdescriptionsaboutstringisnotcorrect?(Thereisonlyonecorrectanswer)
A.串是一种数据对象和操作都特殊的线性表Stringisalinearlistwhosedataobjectsandoperationsbothspecial
B.串是字符的有限序列Stringisafinitesequenceofcharacters.
C.模式匹配是串的一种重要运算Patternmatchingisanimportantoperation.
D.空串是由空格构成的串Emptystringisastringconsistingofspaces.
5单选Seekthestring”BAAABBBAA”‘sfeaturevector,wherethefeaturevectorisdefinedasfollows:(Thereisonlyonecorrectanswer)
A.{-1,0,0,0,0,1,1,1,2}
B.{-1,0,0,0,1,1,1,1,2}
C.{-1,0,0,0,0,0,1,1,2}
D.{-1,0,0,0,0,0,0,1,2}
6多选在字符{A,C,G,T}组成的DNA序列中,A和T、C和G是互补对。判断一个DNA序列中是否存在互补回文串(例如,ATCATGAT的补串是TAGTACTA,与原串形成互补回文串)。下面DNA序列中存在互补回文串的是:(多选)IntheDNAsequencesconsistingofcharacter{A,C,G,T},AandT,CandGarecomplementarypairs.JudgingwhetherthereisacomplementarypalindromesequenceinaDNAsequence(e.g.,ATCATGAT’scomplementstringsisTAGTACTA,itiscomplementarypalindromesequencewiththeoriginalsequence).WhichofthefollowingDNAsequenceshavecomplementarypalindromestring?(Therearemorethanoneanswers.)
A.TGCAACGT
B.AGCTAGCT
C.CTGATCAG
D.GTACGTAC
7填空若字符串s=“software”,则其子串个数为:Ifthestrings=”software”,thenthenumberofitssub-stringis:
数据结构与算法
北京大学
军职在线答案
大学网课