- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
华南理工大学《算法设计》实验报告
华南理工大学《算法设计》实验报告学 院:计算科学与工程专 业:计算机科学院与技术(全英创新班)姓 名:黄炜杰学 号:201230590051 【Experiment requirement】Use many sorting algorithm to sort the array that has n items. These items should be generated randomly. Use template to specify their types.Given a binary tree T which has n elements, and a number called a, search if a exists in T or not.Given a set of vertex and edges with weight in a directed graph G=(E,V), find the shortest path between two vertex in this graph.Given some things with weight and profit, to finish the program to solve it using Greedy method and Search tree method.Given a undirected Graph G=(V, E), to calculate the minimum spanning tree.Initial the 9 grids with number 1 2 3 4 5 6 7 8, they are located randomly at these grids. Rearrange them such that they distributed like this {1 2 3 ; 8 4 ; 7 6 5}. Use MFC or C# to implement it.【Experiment Implementation】5 sorting algorithms are used in my code:Quick Sort2. Selection Sort3. Bubble Sort4. Insertion Sort5. Shell SortAlso, every sorting function are declared as a template. So the input of these functions can be int, double or other comparable type.The size and elements are generated randomly. Result:All the sorting algorithm successfully sort the elements.Binary search tree is a tree structure that the element of parent node is always larger than its left children and smaller than its right children. To define such a structure, we first define a node structure:Every node has an element and two children. There are some functions to get or set their value. Then we define the binary search tree structure:The tree has a root and node count. Functions in this class include:Insert: insert an element to a proper position into the tree. When we insert an element, we will first point to the root. Then compare with it. If it’s larger than this node, pass it to the right children, otherwise to left children. Compare recursively until add it to the leaf.isLeaf: determine whether a given node is leaf node o
您可能关注的文档
最近下载
- 电线电缆产品质量监督抽查实施细则 .pdf VIP
- 2025-2030中国物流业AGV行业市场发展趋势与前景展望战略研究报告.docx VIP
- 英语考研2007考研真相真题解析.pdf VIP
- Unit5RevealingnatureTheSecretlanguageofPlants知识点课件-高中英语外研版(2019)选择性必修第一册.pptx VIP
- 求学圆梦行动补贴申请表(填写模板).doc VIP
- TCESA-2024-117《人工智能 模型即服务(MaaS)功能规范》.pdf
- 肠道菌群与心理健康.pptx VIP
- 四川省拟任县处级党政领导职务政治理论水平任职资格考试模拟题五套.doc VIP
- 清华大学李艳梅有机化学第十章-醇和酚精讲.ppt VIP
- 岩土工程勘察物理力学性质指标统计表(自带的计算公式).xls VIP
原创力文档


文档评论(0)