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 are the major data structures used in the hierarchical data model?

1011


What is array and its types in data structure?

922


How expression trees are gets represented in data structure?

856


Given M x N matrix with sorted elements row wise and column wise, find elements?

971


Can hashset contain null?

1021


What is a linear search?

1011


Which sorting does collections sort use?

891


Explain implementation of deletion from a binary tree.

956


Is it legal to initialize list like this?

953


What is the difference between collection and collections?

1013


What is mean by selection sort?

876


What is tree in computer science?

971


What are the objectives of studying data structures?

1123


Parenthesis is never required in postfix or prefix expressions, why?

894


Why set will not allow duplicates?

885