The reason they picked the former over the latter is because the variable name is found. If it was called searching/finding/notFound then the latter would make more sense.
ps while(!found) is the same as while(found == false) same with while(found) is the same as while(found == true)
why do you think the second piece of code doesn't work? The meaning is just different.
How would you know, if you already found something ahead of time? Maybe something like this would make more sence:
1 2 3 4 5 6 7 8 9
valid = true;
while (valid)
{
//...
if (expression)
valid = false;
//....
}
'!' is logical negation. Basically, if you say "!expression" it is equivalent to "not expression". You can apply it to any expression which will evaluate as boolean.