Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
100%

Please provide an algorithm for problem 1, no need to write a code, just a sequence of steps to follow, thank you.

Problem 1: 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,
CPS188 > Lab 02 > Computation and Introduction to C
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.
expand button
Transcribed Image Text:Problem 1: 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, CPS188 > Lab 02 > Computation and Introduction to C 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.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education