I was looking at code and people were using rbegin, what does it do?
What does rbegin do?
rbegin is the built in function in STL, which returns the reverse iterator pointing to the last element in the structure.
So if you have vector with elements 1, 2, 3, 4, 5 and you start iterating from rbegin to rend and print the elements they would be 5, 4, 3, 2, 1.