You may use `unordered_map::find()` method instead of linear search.