All challenges
Code AnalysisIntermediate 60s

unordered_map pointer survives rehash

You take `int* p = &m[key];` in `std::unordered_map<int,int> m;` then insert enough elements to force a rehash. Is p still valid?

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.

Play this in a 3-minute battle