accessing each node in a list that is an index in a vector

The simple way to access each pair on each list is

for (const auto& list : hashTable)
{
    for (const auto& pair : list)
    {
        ...
    }
}

but the insert function in the code above worries me. If you are iterating over the vectors/lists while you are simultaneously modifying them, that changes things.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top