Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ programming language, do the following: If your nameArray, variable is sorted using Selection Sort Algorithm, it will go through several pass throughs and

in c++ programming language, do the following:

image text in transcribed

If your nameArray, variable is sorted using Selection Sort Algorithm, it will go through several pass throughs and characters will be swapped in each pass through, until nameAwax gets completely sorted (alphabetically, in descending order). Show all these stages (Passes and swaps within Passes) for your pameArray, Here is an example, with the name JONPDOE of how to write these steps: First : JONP DOE Pass 1: PI ON JDO E Swaps: 1-P and J Pass 2: PONJDO E Swaps: None Pass 3: P OOJDN E Swaps: 1-O and N Pass 4 : P O O N! D J E Swaps: 1-N and J Pass 5 : P O O N Jl D E Swaps: 1-J and D Pass 6: P OONJE D Swaps: 1-E and D End: POQNJED//All elements sorted (descending) ** assume I have already defined the array& entered the letters as: char nameArray {'J',' ',N','P','D','O,'E')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago