User profile: ElusiveTau

User info
User name:ElusiveTau
History
Joined:
Number of posts:103
Latest posts:

Templates: Printing out the contents of any STL containers
I recently came across this[1] code snippet which introduced an interesting template declaration: ...

Difference between pass by value and pass by reference
@OP George and Kigar have shown you examples of usage. If you understand pointers and how objects ...

What's the time complexity of .size() when implementation maintains count when items are inserted/deleted?
[quote=Peter87]The time complexity of calling size() is constant ( O(1) ). It just returns the value...

What's the time complexity of .size() when implementation maintains count when items are inserted/deleted?
I was tempted to say it's linear to the number of .insert() and .delete() calls but this isn't corre...

Why does std::set provide a .find() method that takes a reference to an item to be found?
If you have the item you want to look for, what's the point of searching for it in a container? ...