Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a) Ah Chong is going for a Cuti-cuti Malaysia trip with his friends before he straight away go back to his family's hometown. Table
a) Ah Chong is going for a Cuti-cuti Malaysia trip with his friends before he straight away go back to his family's hometown. Table 2 shows the list of tickets of his trip. List of tickets: Pulau Pinang -> Kuala Lumpur Kota Kinabalu -> Kuching Kuala Lumpur ->Kota Kinabalu Langkawi -> Kuala Lumpur Kuala Lumpur -> Langkawi Table 2 i Please take note that the list of tickets in Table 2 is not cyclic. There is one ticket from every city except for the final destination. Outline the accurate itinerary order for Ah Chong based on the list in Table 2. (5 marks) ii. Explain the steps using hashing methods to get the accurate itinerary order. (10 marks) b) Selection sort can also be applied to linked lists because the general algorithm is the same. Write a simple program code to illustrates a selection sort based on array list that takes a series of input numbers from user and print the before and after sorting list. Use the 'arrayList Type.h' library in your program. (10 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
a Itinerary Order and Hashing Explanation i Accurate Itinerary Order Based on the list of tickets in Table 2the following is the accurate itinerary or...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started