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 |
Is array size dynamic or fixed?
What is static array?
Which is faster hashmap or hashtable?
How many types of data structure are there?
What is insertion sort technique?
Explain the term tail recursion?
How do you find the size of an arraylist?
Why is data structure important?
What do you mean by complexity of search algorithm?
Name the areas in which you can apply data structures extensively?
Differentiate between hashset and treeset.
Where is insertion sort used?