Alle Neu

user:thomas Gists erstellt von Nutzer

title:mygist Gists mit Titel

filename:myfile.txt Gists mit Dateinamen

extension:yml Gists mit Dateiendung

language:go Gists in Sprache

topic:homelab gists with given topic

Registrieren

Anmelden


Alle Neu Registrieren Anmelden

All gists matching topic interview

Neueste erstellt
Älteste erstellt
Neueste bearbeitet
Älteste bearbeitet

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

0 Favoriten
0 Forks
1 Dateien
Zuletzt aktiv 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:
Neuer Älter

Powered by Opengist ⋅ Load: 15ms⋅

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