4 ms·
Another example r = 0; outer: { foreach (x in a) {
by VMG 14y ago
Another example
r = 0;
outer: {
foreach (x in a) {
foreach (y in b) {
if (condition(a, b)) {
r = 1;
break outer;
}
}
}
return r;
instead of
foreach (x in a) {
foreach (y in b) {
if (condition(a, b)) {
return 1;
}
}
}
return 0;