STARTING OUT WITH C++ REVEL >IA<
STARTING OUT WITH C++ REVEL >IA<
9th Edition
ISBN: 9780135853115
Author: 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
Java- The Insertion sort is efficient for large arrays. True or False?
Is it possible to implement insertion sort?
What are the advantages and disadvantages of using an unordered array as opposed to an ordered one?
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