The function iterates through the countries array using countries.length directly inside the loop condition.
However, it does not cache the array length in a local variable (e.g., uint256 len = countries.length;).
Impact:
Each loop iteration re-reads countries.length from memory.
Slight increase in gas cost (minor but measurable).
Reduces clarity and consistency in loop structure.
Gas optimizations are invalid according to the CodeHawks documentation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.