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
write an algorithm to show the procedure of insertion into a b-tree?
What are the applications of priority queues?
What is data structure explain in detail?
What is vector and types of vector?
What is the use of sorting?
write a program to accept name & sort them?
Which is better hashmap or hashtable?
What is collision in data structure?
How would you use bsearch() function to search a name stored in array of pointers to string?
What is internal and external sorting?
Is file a data structure?
Which algorithm is used in collections sort method?
What do you mean by open addressing?
Why arraylist is not efficient for manipulation?
Explain what do you mean by insertion sort, bubble sort and selection sort? Also, explain the differences among the functionalities of the three sorts.