answersLogoWhite

0

You would sort the given elements of an array by a bubble sort or heap sort code!!

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What is sparce array?

sparse array is one which has contents lower than its maximum size, that is the array has free or empty locations....


What is the minimum number of swaps required to sort an array?

The minimum number of swaps required to sort an array is equal to the number of inversions in the array.


When quick sort is preferred?

When you want to sort an array.


C program to solve the given array element in descending order?

#include#includeint main(){long int sort[10],i,j,t;printf("\n\ n Enter 10 Elements In Array To Sort In Descending Order:\n"); for(i=0;i


The contents of a particular element of an array is called?

It is the value of the element.


Can you modify the bubble sort algorithm to search to sort an array of characters instead of array of integers?

The bubble sort algorithm can be applied to an array of characters. Every character can be translated to an integer equivalent via the ascii table


What is the difference between sort and asort in PHP?

sort() will order the array by its values without preserving the keys. Use it when array is indexed numerically or when you do not care about the keys. asort() will also sort the array by its values, but it will preserve the key -> value association.


What are the Application of quick sort?

Sorting an array.


What is the code of sorting out an given unsorted array in text file for c plus plus?

Sorting arrays (of any type) can be achieved with the C++ standard library std::sort function: std::array<int, 5> a {9, 3, 5, 1, 7}; // fixed-length array std::vector<int> b {9, 3, 5, 1, 7}; // variable length array int c[] = {9, 3, 5, 1, 7}; // C-style array std::sort (a.begin(), a.end()); std::sort (b.begin(), b.end()); std::sort (c, c+5);


How do you display 15 numbers in an ascending order using an array?

Sort the array then traverse the array, printing the element values as you go.


Sort array in ascending descending order in python?

Using sorted(array,reverse=True)


How do you merge and sort an array using PHP?

To merge and sort an array in PHP you need to use the array_merge() and sort() functions like shown in the example below: <?php $array1 = array(1, 5, 3, 9, 7); $array2 = array(8, 2, 6, 4, 0); // merge the arrays $merge = array_merge($array1, $array2); // 1, 5, 3, 9, 7, 8, 2, 6, 4, 0 // sort the array sort($merge); // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ?>