EPIJ v 1.6.1 Problem 15.8 Most visited pages problem


I noticed this problem is missing from the BST chapter of the latest version of EPIJ.

Was it relocated to another chapter? If not, why was it removed from the book?

The problem says that calls to the functions we’re supposed to implement can be interleaved.

Does this mean parallel execution i.e. multithreaded? Or, not multithreaded, but there can be multiple calls to each function, in any order?




Without reading the solution provided in the book, it just occurred to me that maybe the reason why the problem says function calls can be interleaved is not to suggest that the solution needs to be thread-safe, but rather that the solution shouldn’t rely on the assumption that it can wait till all lines are read before sorting. This implies that page counts must be maintained in sorted state at all times. This would make the difference between choosing HashMap or TreeMap.



Hi @lgtout,

We felt this problem is not a suitable interview coding question so we decide to remove it now. We still have many other candidates that we are trying to release in the future edition (not a priority now).



Hi, @tsunghsienlee

So you’ll be adding new variants in the future? If so, that’s great news!

I think I’m just a little less than halfway through EPI (including variants), so I’ve started wondering about where I should go next for more problems. There are many resources online and offline, but there’s also a lot of variation in quality and effectiveness. Actually, I would be very grateful for any advice from you about that. Thank you.



why can’t this be solved using Min Heap?



Hi, @tsunghsienlee

To be able to judge about which questions are more suitable for a coding interview; may I ask which aspect of this problem makes it not suitable? Is it too complex, does it take longer to code it or else?