下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
2009级(2010学年秋季学期《SE211数据结构与算法》期末试题(B卷(考试形式: 考试时间:2小时考试作弊不授予学士学位 123456789111111I、Selection(withonlyoneIndatastructure,whichofthefollowingstructureofdataisnotrelatedtocomputers(与所使storage B)physicalC)logical D)physicalandstorageThecomputeralgorithmrefersto(sortingschedulingFinitesequencesofoperationsforproblemWhenwetalkaboutthedataincomputermemory,()isakindofstructurewhosephysicaladdressandlogicaladdressarethesameandcontiguous(物理地址与逻辑地址相同并且是storagelogicalcontiguousstoragelinkedstorageGivenastackswiththeinputsequence:1,2,...,n,andtheoutputsequence:p1,p2,…,pn,ifp1=n,thenpi=(). Supposethereisatwo-dimensionarraya[1..60,1..70]with60rowsand70columns,whosemainorderisthecolumnorder(以列序为主序).Ifthebaseaddressis10000andeachelementoccupiestwostorageunit,thenthestorageaddressofa[32,58]is().(无第0行第0列元素) D)Noneof LetAbean×nsymmetricmatrix(对称矩阵)Inordertosavememoryitslowertriangularis(下三角)storedinaone-dimensionalarrayB[1..n(n+1)/2]byrow.Thesubscriptposition(下标)kofanyelementaij(i≥j)inlowertriangularis(对下三角部分中任一元素aij(i≥j)在一维数组B的下标位置k值是)() C)i(i+1)/2+j-1GiventwostringsAandB,theoperationtosearchthefirstpositionofBinAiscalled( B)patternmatchingC)substring D)stringlengthThepost-orderandthein-ordersequencesofabinarytreearedabecanddebac.Thepreorderis(). Useanadjacencytable(邻接表)torepresentandirectedgraphincludingnverticesandedges,thetimecomplexityofdeletingalledgesassociatedwithavertexis( Howmanyminimumspanningtreesdoesanundirectedgraphhas?(morethanoneoronlymaybenotDeterminingwhetherthereisaloopinadirectedgraph,wecanusetopologysortingaswellas()searchingmethodforthecriticalpath(求关键路径方法breadth-firsttraversaldepth-firsttraversalUsingthebreadth-firstalgorithmtotraversethegraphrepresentedbyanadjacencytable,weshouldusethedatastructurenamed()toimplementit. Usingthedepth-firstalgorithmtotraversethegraphrepresentedbyanadjacencytable,weshouldusethedatastructurenamed()toimplementit. Ifthereexistsamappingrelationshipbetweenthememoryaddressofanodeandthekeyword(结点的存储地址与其关键字之间存在某种映射关系),wecalledthestorage第3页/第3页/5scatter(Hash)storagelinkedstorageindexstorage Whichkindofsortingalgorithmweused?(Selection B)shell C)merge D)quick BlankThetimecomplexity “i=1;while(i<=n) Thetimecomplexityofaccessanynodeinthecontiguouslist(顺序表)is ,sowecalledthecontiguouslistthe datastructure.Ifthereexistacompletebinarytree(完全二叉树)including768nodes,thenthenumberoftheleafnodeis Ifthereexistak-waytree(K叉树)includingnnodes,themaximumpossibledepth ,theminimumdepthis arebothcommonlyusedstoragestructureforgraphs.Totraverseagraph,weusuallyusethefollowingtwomethods: Inordertomergetwoorderedsequenceswithlengthmintoaneworderedsequence,weneedatleast timesofkeycomparing,andatmost timesofkeycomparing.SupposeadirectedgraphGincludingasetofvertex{v1,v2,v3,v4,v5},andasetof{<v1,v2>,<v2,v4>,<v3,v5>,<v1,v3>,<v1,v5>,<v2,v3>,<v3,v4>,<v4,v5>},thenodewhichhasthegreatestin-degree(入度)is .Thenodewhichhasthegreatestout-degree(出度)is,theresultoftopologicalsortingofGis QuestionsandAnswersGivenanemptybinarytree,pleaseinserte,b,d,f,a,g,cinsequence,bytheerconstructingabinarysearchtree.(9%)AssumingthemessageusedforcommunicationiscomposedofonlyC1~C8letters(用于通C1~C8字母组成)thefrequencyofeachletterappearinginthemessageis0.07,0.19,0.02,0.06,0.32,0.03,0.21,0.10.DesigntheHuffmancodingforthese8letters,andrepresentitwithanotherequallengthbinaryencodingmethodfrom0to7(试80~7的二进制等长编码方案表示).Inthisexample,comparetheadvantagesanddisadvantagesofthesetwomethods.(9%)GivenagraphG,seefigure1.TrytofindouttheMinimumspanningtree(最小生成树),anddrawthelogicalstructuralgraph(逻辑结构图).ShowtheStorageforgraphG,withtwodifferentrepresentations(hint:useadjacencymatrixandadjacencytable).Inthefollowingsequenceofkeys,insertthekeys,intheordershown,tobuildthemintoanAVLtree.Pleasedrawtheillustrationfiguresforthewholeprocedure.(9%) Reverse(逆转List:DesignanalgorithmtoreservealistLYouaregivenTheheadofL:Linklist*Thedeclarationoflist-node:template<classEntry>structLinklist{Entrydata;Linklist*next;Declarationofprotofunction:voidreverse(LinklistNode:DonotcreatenewnodeforthereversedlistwhenHint:TheillustrationfiguresforthewholeprocedureisasWriteafunctionvoidselectionSort(intA[],intn)toimplementaselectionsortalgorithm.ThearrayA[]containstheintegerstosort,andndenotesthesizeofA[] Writeanon-recursive(非递归)algorithmtotraverseabinarytreebypre-order(前序)Thedeclarationofbinarytreeandtreenodearegivenasfollowing:template<classclass{
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年泉州师范学院马克思主义基本原理概论期末考试笔试真题汇编
- 2026年阿勒泰职业技术学院单招职业技能考试参考题库附答案详解
- 2026 年高职新闻传播(新闻写作)试题及答案
- 高中生运用地理模型模拟城市内涝应急通信中断应对方案课题报告教学研究课题报告
- 2026年鹤壁职业技术学院单招综合素质笔试备考试题附答案详解
- 2026年可穿戴设备行业分析报告
- 2026年宁波财经学院单招综合素质笔试参考题库附答案详解
- 初中生物细胞膜选择性通透机制的3D打印模拟研究课题报告教学研究课题报告
- 2026年辽宁轨道交通职业学院单招综合素质考试备考题库附答案详解
- 安全培训十不站美食课件
- 手镯翡翠买卖协议书范本
- NB/T 11438-2023循环流化床气化炉运行导则
- 食品营养学(暨南大学)智慧树知到期末考试答案章节答案2024年暨南大学
- 人类普遍交往与世界历史的形成发展
- 山东省潍坊市2023-2024学年高一上学期期末考试英语试题(解析版)
- 沈阳职业技术学院单招《职业技能测试》参考试题库(含答案)
- Python数据分析与应用-从数据获取到可视化(第2版)课件 第6章 数据可视化
- 《美容皮肤学》考试复习题库(含答案)
- 汽车吊起重吊装专项施工方案
- 基本养老保险参保缴费证明
- 闺蜜测试卷试题
评论
0/150
提交评论