simple algorithm for bubble sort?
Answer / siri
void bubble(int x[],int n)
{
int hold,j,pass;
int switched=true;
for(pass=0;pass<n-1&&switched=true;pass++){
switched=false;
for(j=0;j<n-pass-1;j++)
if(x[j]>x[j+1]){
switched=true;
hold=x[j];
x[j]=x[j+1];
x[j+1]=hold;
}
}
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Does arraylist have a tostring?
What is the difference between linked list and array?
Explain quick sort and merge sort algorithms and derive the time-constraint relation for these.
Define depth and height of a node?
What is doubly linked list in data structure?
What is max heapify?
What is the difference between list, set and map?
By Which algorithm, the 8 queens problem is solved?
Define degree of the node?
what is atmost complete binary tree?
What do you mean by probing?
What is time complexity of binary search?