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

Write the importance of hashing?

1020


What is sort function?

877


What is the difference between ienumerable and list?

846


Is json a data structure?

924


What are the types of queues?

1084


Differentiate between set and map.

1145


What is difference between list and linked list?

940


Why is the isempty() member method called?

1035


how to add an item to the beginning of the list?

966


State the properties of a binary tree?

1086


What are AVL trees?

1048


Why use a tuple instead of a list?

854


Explain binary searching, Fibonacci search.

939


What is binary tree used for?

945


Differentiate between hashset and hashmap.

975