1. General InstructionsFor this assignment you will implement functions in C for an AVL Tree. You are given askeleton C code in the following files: avl.h avl.c main.cand the file with values that should be read and added to the AVL Tree for testing your code: input.txtand a make file for compiling the code on the Schools server: MakefileComplete the missing functions or parts of functions in the skeleton code. You should use thesame names of files, functions, and variables as we specified in the skeleton code. This isbecause our grading will be based on a script that assumes that you use the samenames. Make sure your code compiles without errors using the provided makefiles for thetwo abstract data structures on the ENGR server.What to submit: Please submit only the two completed C files -- avl.c and main.c -- viaTEACH by the deadline. Please do not submit the header, compiled object or executable files.Questions regarding HW4 should be posted to HW4 Discussions on Canvas for fast response.2. AVL TreeThe main function performs the following:Initializes an empty AVL tree.Reads values from an input file and adds them to the AVL tree.Prints on the terminal all values of the AVL tree in the breadth-first fashion.Finds the minimum-cost path in the AVL tree (see details below).Prints the execution t代写AVL Tree作业、代写c/c++编程作业、代做c/c++课程设计作业、代做skeleton code作业 代做数ime for finding the min-cost path, on the terminal.Prints values of nodes that lie on the minimum-cost path in the AVL tree, on the terminal.The order of nodes in the print-out must strictly follow their order in the min-cost path fromthe root to the leaf.Prints a cost of the min-cost path of the AVL tree, on the terminal.Your task is to complete the missing functions or parts of functions in avl.c andmain.c. Search for the comment FIX ME to find which functions you need to complete. Thecomments before each function are aimed at clarifying the functions inputarguments, outputs, and what the function is supposed to do. Note that we will test your codewith another input.txt file.4. Grading policy: Max 100 points25 points: The code runs without memory issues, but does not print out the correct AVL tree,and does not compute the correct minimum-cost path.50 points: The code prints out the correct AVL tree, but does not compute the correctminimum-cost path.85 points: The code prints out the correct AVL tree, computes the correct minimum cost, butdoes not print out nodes of the min-cost path in the correct order from the root to the leaf(e.g., some nodes are missing, or wrongly swapped).100 points: The code prints out the correct AVL tree, and nodes of the min-cost path in thecorrect order from the root to the leaf.转自:http://www.3daixie.com/contents/11/3444.html
讲解:AVL Tree、c/c++、c/c++、skeleton codeSQL|Python
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...