PracHub
QuestionsLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Asana

Find frequent IPs from a huge file

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in large-scale data processing and algorithm design, focusing on memory- and disk-constrained frequency estimation, streaming and approximation concepts.

  • medium
  • Asana
  • Software Engineering Fundamentals
  • Software Engineer

Find frequent IPs from a huge file

Company: Asana

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Onsite

You are given a very large log file (too large to fit in memory). Each line contains an IPv4 address (e.g., `203.0.113.7`). Design an approach to answer one of these variants under memory constraints: - **Variant A:** Find the single most frequent IP. - **Variant B:** Find the top `K` most frequent IPs. Explain how you would implement it in practice (data structures, disk usage, complexity), and how your approach changes if: - Memory is limited to, say, 256MB. - The file is tens/hundreds of GB. - You only need an approximate answer.

Quick Answer: This question evaluates a candidate's competency in large-scale data processing and algorithm design, focusing on memory- and disk-constrained frequency estimation, streaming and approximation concepts.

Related Interview Questions

  • Design an Extensible Animal-Chess Game Engine - Asana (medium)
  • Model and Solve a Rectangular Jigsaw Puzzle - Asana (medium)
  • Design a Testable 2048 Game Engine - Asana (medium)
  • Design and Solve a Rotatable Jigsaw Puzzle - Asana (medium)
  • Design a 2048 Game - Asana (medium)
|Home/Software Engineering Fundamentals/Asana

Find frequent IPs from a huge file

Asana logo
Asana
Jan 7, 2026, 12:00 AM
mediumSoftware EngineerOnsiteSoftware Engineering Fundamentals
40
0

You are given a very large log file (too large to fit in memory). Each line contains an IPv4 address (e.g., 203.0.113.7).

Design an approach to answer one of these variants under memory constraints:

  • Variant A: Find the single most frequent IP.
  • Variant B: Find the top K most frequent IPs.

Explain how you would implement it in practice (data structures, disk usage, complexity), and how your approach changes if:

  • Memory is limited to, say, 256MB.
  • The file is tens/hundreds of GB.
  • You only need an approximate answer.
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Asana•More Software Engineer•Asana Software Engineer•Asana Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.