I was converting a C++ algorithm to C#. I came across this for loop:
for (u = b.size(), v = b.back(); u--; v = p[v]) b[u] = v;
It gives no
In C everything non-zero is true in "boolean" contexts, such as the loop end condition or a conditional statement. In C# you have to make that check explicit: u-- != 0.
true
u-- != 0