Design and implement a web browser which supports the functionality that at any given instance you can efficiently tell the top 5 visited websites on basis of number of visits.
struct Webpage
{
std::string url;
size_t numberOfVisits;
};
struct History
{
void visit(const std::string & url) {
}
void printTop5() {
}
};Any ideas?