2022北京交通大学数据结构第二次作业代码,约瑟夫环,就地逆置

上传者: 61248653 | 上传时间: 2022-09-24 22:06:58 | 文件大小: 34.33MB | 文件类型: RAR
2.19 已知线性表中的元素以值递增有序排列,并以单链表作存储结构。试写一高效的算法,删除表中所有值大于mink且小于maxk的元素(若表中存在这样的元素),同时释放被删结点空间,并分析你的算法的时间复杂度(注意: mink和maxk是给定的两个参变量,他们的值可以和表中相同,也可以不同) 2.22 试写一个算法,实现顺序表的就地逆置,即利用原表存储空间将线性表(a1, a2,…, an)逆置为(an, an-1,, a2 , a1)。 2.38 设有一个双向循环链表,每个结点中除有prior,data和next三个域外,还增设了一个访问频度域freq。在链表被起用之前,频度域freq的值均初始化为零,而每当对链表进行一次locate(L,x)的操作后,被访问的结点(即元素值等于x的结点)中的频度域freq的值便增1,同时调整链表中结点之间的次序,使其按访问频度非递减的次序顺序排列,以便始终保持被频繁访问的结点总是靠近表头结点。试编写符合上述要求的locate操作的算法。 2.39 约瑟夫(Josephus)环问题:编号为1,2,3,…,n的n个人按顺时针方向围坐一圈,

文件下载

资源详情

[{"title":"( 38 个子文件 34.33MB ) 2022北京交通大学数据结构第二次作业代码,约瑟夫环,就地逆置","children":[{"title":"Lab02","children":[{"title":"T2.cpp <span style='color:#111;'> 384B </span>","children":null,"spread":false},{"title":".vs","children":[{"title":"Lab02","children":[{"title":"v16","children":[{"title":"Browse.VC.db <span style='color:#111;'> 15.63MB </span>","children":null,"spread":false},{"title":".suo <span style='color:#111;'> 44.50KB </span>","children":null,"spread":false},{"title":"ipch","children":[{"title":"AutoPCH","children":[{"title":"840aad0005a9e81e","children":[{"title":"T3.ipch <span style='color:#111;'> 33.94MB </span>","children":null,"spread":false}],"spread":true},{"title":"9f8edbe23c8ee24b","children":[{"title":"LAB02_FUNC.ipch <span style='color:#111;'> 33.94MB </span>","children":null,"spread":false}],"spread":true},{"title":"9e248f0b6f37a1de","children":[{"title":"LAB02_FUNC.ipch <span style='color:#111;'> 33.88MB </span>","children":null,"spread":false}],"spread":true},{"title":"6fd77f0626ec4e3b","children":[{"title":"T4.ipch <span style='color:#111;'> 33.94MB </span>","children":null,"spread":false}],"spread":true},{"title":"c8aec8f974238c98","children":[{"title":"T1.ipch <span style='color:#111;'> 33.94MB </span>","children":null,"spread":false}],"spread":true},{"title":"5ba40ff95d8f64b5","children":[{"title":"T2.ipch <span style='color:#111;'> 33.94MB </span>","children":null,"spread":false}],"spread":false},{"title":"7975c0722a29ae0b","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"T3.cpp <span style='color:#111;'> 534B </span>","children":null,"spread":false},{"title":"Lab02.vcxproj.filters <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"Lab02_func.cpp <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"Lab02.vcxproj <span style='color:#111;'> 7.24KB </span>","children":null,"spread":false},{"title":"T1.cpp <span style='color:#111;'> 388B </span>","children":null,"spread":false},{"title":"Lab02_func.h <span style='color:#111;'> 528B </span>","children":null,"spread":false},{"title":"Lab02.vcxproj.user <span style='color:#111;'> 168B </span>","children":null,"spread":false},{"title":"T4.cpp <span style='color:#111;'> 308B </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"Lab02.vcxproj.FileListAbsolute.txt <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"Lab02.ilk <span style='color:#111;'> 498.21KB </span>","children":null,"spread":false},{"title":"Lab02.exe.recipe <span style='color:#111;'> 291B </span>","children":null,"spread":false},{"title":"Lab02.tlog","children":[{"title":"CL.write.1.tlog <span style='color:#111;'> 1.74KB </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 39.51KB </span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'> 3.40KB </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 686B </span>","children":null,"spread":false},{"title":"Lab02.lastbuildstate <span style='color:#111;'> 239B </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 4.23KB </span>","children":null,"spread":false}],"spread":false},{"title":"T3.obj <span style='color:#111;'> 795B </span>","children":null,"spread":false},{"title":"T2.obj <span style='color:#111;'> 795B </span>","children":null,"spread":false},{"title":"vc142.pdb <span style='color:#111;'> 452.00KB </span>","children":null,"spread":false},{"title":"T4.obj <span style='color:#111;'> 795B </span>","children":null,"spread":false},{"title":"Lab02_func.obj <span style='color:#111;'> 35.23KB </span>","children":null,"spread":false},{"title":"Lab02.log <span style='color:#111;'> 382B </span>","children":null,"spread":false},{"title":"Lab02.exe <span style='color:#111;'> 52.50KB </span>","children":null,"spread":false},{"title":"T1.obj <span style='color:#111;'> 55.81KB </span>","children":null,"spread":false},{"title":"vc142.idb <span style='color:#111;'> 275.00KB </span>","children":null,"spread":false},{"title":"Lab02.pdb <span style='color:#111;'> 1.11MB </span>","children":null,"spread":false}],"spread":false},{"title":"Lab02.sln <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明