Well, the above program is sorting the array in descending order.
Initially, while loop starts execution by evaluating the iniatial condition
For the first time the first for loop will be executed completey, the content of array will be as follows :
After the second for executed completey the content of array will be as follows:
But the value variable done is still $0$ so while loop will execute again,so now the content of array after executing the first for loop will be $6,5,4,3,2,1$ and no change in second for loop but still the done variable is $0$.
So, while loop execute again,now done variable is modified to $1$ and there will be no change in done variable because inside first and second for loop no if condition will satisfied .
Finally, the while condition is evaluted false and value of $array$ will be printed which is $3$.