Code AnalysisBeginner 60s
Unsigned underflow in a countdown loop
What is the bug in this loop?
Starter code
#include <vector>
void f(const std::vector<int>& v) {
for (std::size_t i = v.size() - 1; i >= 0; --i) {
// use v[i]
}
}Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.