PracHub
QuestionsPremiumCoachesLearningGuidesInterview 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 a 2048 Game - Asana (medium)
  • Explain code complexity and design two games - Asana (medium)
  • Design a jigsaw puzzle (OOD) - Asana (medium)
Asana logo
Asana
Jan 7, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
16
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.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

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
PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL 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.