EPIJ v 1.6.1 Problem 15.8 Most visited pages problem

#1

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?

Thanks.

0 Likes

#2

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.

0 Likes

#3

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).

0 Likes

#4

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.

0 Likes

#5

why can’t this be solved using Min Heap?

0 Likes

#6

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?

0 Likes