4 ms·
I remember story of my friend in algorithmic contest for high school students in Poland (which are quite hard). He solved problems correctly, but in his impleme
by kornakiewicz 12y ago
I remember story of my friend in algorithmic contest for high school students in Poland (which are quite hard). He solved problems correctly, but in his implementation he got to check in every iteration of loop if a collection still got any elements. He used col.size()==0 instead of col.isEmpty(). The first was O(n) and it fucked up all performance.