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

List some applications of multilinked structures?

835


What is the use of space complexity and time complexity?

994


Is hashset thread safe?

920


Describe the degree term in a tree.

901


What are the Difference between tcp and udp?

914


Why sorting is done?

812


Can treemap key null?

983


Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78

1544


What are the major data structures used in the following areas : network data model & hierarchical data model?

981


What is breadth first tree?

948


What is a directed graph?

900


Which is best book for data structures?

883


How many links are there in a binary tree of N nodes?

965


Reverse a linked list from the middle.

875


Which is the parent class of linkedlist class?

912