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
What are the benefits of using arrays?
What is the difference between Array and LinkedList?
What is bubble sort with example?
Which is the simplest file structure?
What are the advantages and disadvantages of copyonwritearraylist?
Describe the types of data structures?
What is dynamic data structure?
Write a recursive c function to calculate the height of a binary tree.
What is the difference between hashset and linkedhashset?
What is the difference between for and foreach loop?
What is data structure explain different types of data structures with examples?
In depth questions regarding the data structures and the Databases used in the Projects developed.
Which are the sorted collections?
Can a stack be described as a pointer? Explain.
Why is data structure needed?