EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
C/C++代写
您的位置: 主页 > 编程案例 > C/C++代写 >
代写C++/C:CS代写之C语言基础课程Data Structures and Algorithms Assignment 2实现 - C++代写
发布时间:2021-07-25 22:18:37浏览次数:
Would result in an edge from vertex 0 to vertex 5 (in bold) with weight calculate usingcost_funcA(46-49).You must use the following data structures to represent the graph as an adjacency list:typedefstructedge{intto_vertex;intweight;}Edge;typedefstructedgeNode{Edgeedge;structedgeNode*next;}*EdgeNodePtr;typedefstructedgeList{EdgeNodePtrhead;}EdgeList;typedefstructgraph{intV;EdgeList*edges;}Graph;Part AFor part A you will use cost_funcAwhich always produces positive edge weights to generate the adjacency list.You should then implement Dijkstra’s algorithm based on the pseudocode on Wikipedia (https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm). While a priority-queue implementation would be best for our scenario, you should instead use a simple search to find the nearest vertex.Your submission must contain a main function that:·generates aDEM·converts it to an adjacency list usingconst_funcA·calculates the shortest paths from vertex 0 (top left in theDEM)·reconstructs the path to the last vertex (bottom right in theDEM)·creates a copy of the DEM with the heights changed to -1 for any vertex on thepath·prints the DEM to show thepathPart BFor part B you will use cost_funcB,which may produce negative edge weights (but no negatively weighted cycles, to build a new adjacency list.You should then implement the Floyd-Warshall algorithm based on the pseudocode on Wikipedia (https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm). Your solution must follow this pseudocode as closely as possible (note however, that in our graph specification the vertex labels start at 0).Your submission must contain a main function that:·includes all of the code from partA·calculates a new adjacency list usingconst_funcB·calculates all shortest paths usingFloyd-Warshall·reconstructs the path from the first to last vertex (top-left tobottom-right)·creates a copy of the DEM with the heights changed to -1 for any vertex on thepath·prints the DEM to show thepathPart B does NOT have to be in a separate project.A Note on StyleI have not specified file names and code structure. You should endeavour to make your code as general, and hence reusable, as possible. Code should be organised into functions and files that make reuse easy. Functions and data structures should be properly commented so that another programmer will know how to use them.Assignment SubmissionAssignments will be submitted via MyLO (an Assignment 2 dropbox will be created). You should use the following procedure to prepare your submission:·Make sure that your project has been thoroughly tested using the School’s lab computers·Choose “Clean Solution” from the “Build” menu in Visual Studio. This step is very important as it ensures that the version that the marker runs will be the same as the version that you believe the marker isrunning.·Quit Visual Studio and zip your entire project folder along with a completed assignment coversheet·Upload a copy of the zip file to the MyLOdropboxHistory tells us that mistakes frequently happen when following this process, so you should then:·Unzip the folder to a new location·Open the project and confirm that it still compiles and runs asexpectedo If not, repeat the process from thestartKIT205 Data Structures and Algorithms: Assignment 2Synopsis of the task and its contextThis is an individual assignment making up 15% of the overall unit assessment. The assessment criteria for this task are:1.Implement code to construct an adjacency list representation of agraph2.Implement Dijkstra’s algorithm to find shortestpaths3.Implement Floyd-Warshall algorithm to find shortestpathsMatch between learning outcomes and criteria for the task

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。