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

Which is the parent class of abstractsequentiallist class?

867


Give a real time example of stack

911


Which is the parent class of hashmap class?

1081


Does linked list allow null values?

771


How do you use merge sort?

811


Which time complexity is best?

839


What is the difference between dictionary and hashtable?

962


Which programming language is best for data structures?

848


What is the quickest sorting algorithm?

896


Differentiate between file and structure storage structure.

909


Why is data structure important?

945


What is the time complexity of arraylist and linked list?

875


What do you know about different sorting algorithms?

977


Does hashmap preserve insertion order?

843


How do I remove a value from a list?

809