We can just utilize map's insert_or_assign() function and check the return value to determine whether or not we need to insert the key into the keys_order vector.