The Round-Robin Hit Rate
easyBefore any cache-aware design is on the table, quantify what cache-blind routing costs. A shared preamble is resident on the one card that prefilled it - in the drill, a fleet where every card eventually holds every family is not assumed, so the first-order hit rate is exactly the chance a round-robin rotation lands back on the resident card: one in the number of cards. Doubling the fleet does not help, it halves the chance, which is the counterintuitive direction candidates get wrong under pressure: more replicas spread load and, at the same time, spread the cache. Interviewers want the number stated plainly, then the fix named in one line - point the hash at the prefix family, and the same hardware moves from a one-in-n hit rate to a hit rate bounded only by cache capacity. Implement hit_share(cards): return the percent of arrivals that land on the card holding their preamble under perfect round-robin, rounded to 2 decimals. It is 100.0 divided by cards, and the decimal-cast matters: with 8 cards the answer is 12.5, not 12.
Run your code to see output