Computer Science, asked by fizzamumtazdgk123, 5 months ago

Write an algorithm in an array is in ascending order??​

Answers

Answered by sarojvaishnav81
0

Answer:

Sort an array - the selection sort algorithm

Introduction

In this webpage, we will study a classic computer algorithm that is used to sort an array

The algorithm is called selection sort

Wikipedia has a nice write up on this algorithm: click here

We will sort an array of double in our programming example

The selection sort algorithm can be used to sort any data set where there is an ordering among the data items.

The Selection Sort algorithm - overview

Example problem:

You are given the following 5 numbers:

6.4 2.5 1.2 2.2 1.1

Sort the number in ascending order.

I.e., form the following sequence:

1.1 1.2 2.2 2.5 6.4

Overview of the Selection Sort algorithm:

Explanation:

plzz mark as brainlest

Similar questions