linkjobai / Design a Hit Counter (LeetCode 362) and How It Scales
0 curtidas
0 bifurcações
1 arquivos
Última atividade 19 hours ago
Interview prep notes
Design a Hit Counter (LeetCode 362) and How It Scales
"Design a hit counter that returns the number of hits in the past 5 minutes" starts as a data-structure question and often turns into a mini system design discussion.
Version 1: a queue of timestamps
from collections import deque
class HitCounter:
Próximo
Anterior