Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
9th Edition
ISBN: 9780134498379
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 8, Problem 6RQE
Program Plan Intro

Sorting:

When contents of the array being arranged in the particular order is called as sorting. The order of arranging the contents can be ascending or descending order.

Bubble sort:

  • Bubble sort is used to sort the elements present in the array either in the ascending or in the descending order by performing comparison in each passes.
  • The comparison is made one after another till the end of the list.
  • When the array elements are needed to be sorted in the ascending order the smaller elements are placed at the front of the list.
  • When the array elements are needed to be sorted in the descending order the larger elements are placed at the front of the list.

Blurred answer
Students have asked these similar questions
Fill-in-the-Blank Why is selection sort more efficient than bubble sort on large arrays?
Java- The Insertion sort is efficient for large arrays. True or False?
What is Slow Insertion in an Ordered Array?

Chapter 8 Solutions

Starting Out with C++ from Control Structures to Objects (9th Edition)

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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning