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
explain how nested loop works in assigning and printing values of elements in multidimensional arrays.
What is Slow Insertion in an Ordered Array?
#C++ #array-based implementation How to insert even number in an array in ascending order by using insertion sort

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