13. Suppose you want to travel to different cities at the end of the year. You start to plan to visit Tai (denote as T),

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

13. Suppose you want to travel to different cities at the end of the year. You start to plan to visit Tai (denote as T),

Post by answerhappygod »

13 Suppose You Want To Travel To Different Cities At The End Of The Year You Start To Plan To Visit Tai Denote As T 1
13 Suppose You Want To Travel To Different Cities At The End Of The Year You Start To Plan To Visit Tai Denote As T 1 (33.69 KiB) Viewed 25 times
13. Suppose you want to travel to different cities at the end of the year. You start to plan to visit Tai (denote as T), Hua (denote as H). Yi (denote as Y). Kao (denote as K Nan (denote as N) and Peng desate as P). Due to limited budget, you find the cheapest fare to travel all the cities. You list down all the traveling fares between any two cities and draw a simple graph (shown as following graph). Now, you are required to apply Minimum Spanning Troe concept to find the total minimum fares and show all the routes between cities. Assume that the starting city is Tai and you must show the route between cities according to sequence you find the cheapest fare between cities (9 marks) DATA STRUCTURE AND ALGORITHM 120 11 30 60 70 70 50 70 40 90 80 14. a) Why the base case is important in recursive method? 3 marks) b) Design a recursive method testint n) to display the series data 0246... 0634 1-2 n when user passed the number n into method For example, when the ser passes the number 6 into recursive method, the method will display 0246. (6 marks) 15. Evaluate the worst case running time of the following pseudocode function and recurrence function in Big-O notation in terms of the variable. You must justify your answers a) T(m) 2(8) b) public void testo for (int i=nni>0; i--) 1 for (int j -0.jj++) System.out.println(" + for (int k = 0;kik++) System.out.println("+kX for (int -0,h<99999999,-) System.out.println( hh)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply