c++ - Stream of Integers arriving at specified interval need to look sorted -
interview question: there stream of integers arrives @ specified intervals (say every 20 sec). container of stl use store them integers sorted? reply map/set when there no duplicate or multimap/multiset when there duplicate. better answer if exists?
use multiset
if want preserve duplicates. if don't want preserve duplicates, use set
.
Comments
Post a Comment