Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write programs for Bubble Sort, Quick sort

Answer Posted / srinivsa

void bubbleSort(int numbers[], int array_size)
{
int i, j, temp;

for (i = (array_size - 1); i >= 0; i--)
{
for (j = 1; j <= i; j++)
{
if (numbers[j-1] > numbers[j])
{
temp = numbers[j-1];
numbers[j-1] = numbers[j];
numbers[j] = temp;
}
}
}
}

Is This Answer Correct ?    57 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the queue data structure.

980


Is priority queue sorted?

919


Tell me can the size of operator be used to tell the size of an array passed to a function?

951


What are linked list?

905


What is data structure geeksforgeeks?

1210


State the rules to be followed during infix to prefix conversions?

1004


What do you mean by shortest path?

1011


Why insertion is faster in linked list?

790


Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?

924


Why it is said that searching a node in a binary search tree is efficient than that of a simple binary tree?

931


List the data structures which are used in rdbms, network data modal, and hierarchical data model.

845


What does it mean to sort an array?

887


Which file contains the definition of member functions?

893


How do you find the height of a binary tree?

846


What is fibonacci search?

957