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

What's the difference between a hashtable and a hashmap?

868


What is the difference between Array and Array List ? Explain in brief with example.

915


What is adt example?

959


Why is merge sort faster?

829


What is a treeset?

835


How do treesets work internally?

860


What is collection process?

914


What is the need for priority queue?

936


Why arraylist is not efficient for manipulation?

811


Does arraylist guarantee insertion order?

860


Does mentioning the array name gives the base address in all the contexts?

1304


How would you use bsearch() function to search a name stored in array of pointers to string?

800


What is data structure and data type?

913


Explain the principle of quicksort. What is its complexity?

995


Is a hashmap a dictionary?

816