Question
Suppose you have n two-digit numbers. For example, if n = 5, you may have the following 5 two-digits number: 24 11 57 17 46
Suppose you have n two-digit numbers. For example, if n = 5, you may have the following 5 two-digits number: 24 11 57 17 46 Your goal is to arrange your list in ascending order. So, for the example above, your final answer would be: 11 17 24 46 57 .
Think of a procedure to perform this task (your list can have repeated numbers). Test your idea with different values of n. Once you have decided how it can be done, write your solution as a sequence of steps that can be followed in order. How have you ensured that your algorithm eventually stops? Have you tested your algorithm on unusual data (like numbers that are all the same, or that are already sorted)? Number each step of your algorithm, and explain briefly what its role is in achieving your goal. Pick a list of numbers of your choice, and show by hand how your algorithm will achieve the sorting required.
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