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 / ganga

all the above programs are wrong!!!

heres a perfect one.. simple logic!

for(i=0;i<n-1;i++)
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
// now print the elements n see

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the need for extendible hashing?

977


What is data structure and why it is important?

948


Does arraylist maintain insertion order?

839


What are the topics in data structures?

1012


What is the structure of an array?

911


Explain extended binary tree.

969


Which sorting is best for large data?

940


What are the advantages of array?

914


What is the main advantage of a linked list?

1000


Sorting is not possible by using which of the methods?

922


Why are b trees used?

868


What is merge sort in daa?

873


What are the advantages of bubble sort?

967


What happens if we put a key object in a hashmap which exists?

951


How many types of priority queue are there?

923