5 ms·
Traditional C style for is terrible compared to what you can do with iterators in my opinion, but idk if C++ has those. list.iter().sum() ezpz
by kalkr 2y ago
Traditional C style for is terrible compared to what you can do with iterators in my opinion, but idk if C++ has those.
list.iter().sum()
ezpz