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 |
Define shortest path?
Tell me what is quick sort?
What is frozenset?
Write the recursive c function to count the number of nodes present in a binary tree.
Why might quick sort might be better than merge sort?
Define a full binary tree ?
Does hashmap allow duplicate keys?
What is concurrentlinkeddeque?
What is the difference between Array and Arraylist?
Tell me do array subscripts always start with zero?
What does the term sorting refer to?
Complete structure of hashmap, very detail description, along with the basic coding of the hashmap internal implementation.