Interview Question
- 0of 0 votes
AnswersI want to store an item of below structure in a C++ contrainer.
- northernlight November 24, 2015
struct xyz
{
int i;
time_t timestamp;
}
I also want to calculate summation of 'i' of all elements in the container which have been added in past 60 secs.
Which container or data structure is best for this scenario. Should take care of iterator invalidations while calculating the summation iterating the container items (which can happen if a new element gets added when I am iterating).| Report Duplicate | Flag | PURGE
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.