[Solved] Get Last element from unordered_set [closed]
In an unordered_set, the order of inserts does not necessarily correspond to the order that you will get when the set is iterated (hence the name “unordered”). Part of the reason why a bi-directional iterator is not supported(using a — operator) in this data structure is because being able to go backwards/forwards on an unordered_set … Read more