Question bank › Hashing
Dsa Hashing Easy

Network IP Burst Detector

You are monitoring network traffic. Given a sliding window size W and a threshold K, you need to identify the first IP address in the traffic log that appears at least K times within a window of W consecutive log entries. If no such IP exists, print 'NONE'. Example: Input: 5 3 192.168.1.1 10.0.0.1 192.168.1.1 172.16.0.5 192.168.1.1 10.0.0.1 Output: 192.168.1.1 (The IP 192.168.1.1 appears 3 times within the first 5 entries).

Key concepts

hashingsliding windowfrequency counter

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.