Tutti Nuovi

user:thomas utente che ha creato il gist

title:mygist titolo del gist

filename:myfile.txt nome di file nel gist

extension:yml estensione del file nel gist

language:go linguaggio del file nel gist

topic:homelab gists with given topic

Registrati

Entra


Tutti Nuovi Registrati Entra

All gists matching topic interview

Più recente creazione
Meno recente creazione
Più recente aggiornamento
Meno recente aggiornamento

linkjobai / Design a Hit Counter (LeetCode 362) and How It Scales

0 mi piace
0 forks
1 files
Ultima volta attivo 19 hours ago
Interview prep notes
interview

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:
Più nuovi Più vecchi

Creato da Opengist ⋅ Load: 14ms⋅

Italiano
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文