Question
d.We have provided two further lists of names, that is, second_list and third_list, which contain 15 and 20 names, respectively. Import each of these in
d.We have provided two further lists of names, that is, second_list and third_list, which contain 15 and 20 names, respectively. Import each of these in turn and find out how many comparisons are needed to sort them, using the when[a]key_pressed bubble sort script, and noting the results. Then repeat the experiment, this time using the when[b]key_pressed oddeven sort script, again noting the results. Copy the following table into your TMA document and complete it. Number of items:10 15 20. Number of comparisons using bubble sort 1: 81 Number of comparisons using oddeven sort :45. Second list: Alice Juan Mohammed Ode Walter Zeno Dewi Ivan Sue Kostas Liz Aidan Jacob Idris Kamala third list: Alice Juan Mohammed Ode Walter Zeno Dewi Ivan Sue Kostas Liz Aidan Jacob Idris Kamala Zia Jules Malcolm Babatunde Kaia
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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