InterviewStack.io LogoInterviewStack.io

Working with Large-Scale Datasets Questions

Analyzing data that does not fit comfortably in memory or a single query. Covers distributed processing concepts, partitioning and sampling strategies, query and pipeline performance, and trade-offs when scaling an analysis. Focuses on getting correct answers efficiently at scale.

MediumTechnical
84 practiced

You need to compute PCA on a numeric dataset stored as a 200GB binary matrix on disk. Explain how to use numpy.memmap for memory-efficient access and design an approach that computes the leading k principal components without loading the whole dataset into RAM. Provide code sketches and discuss trade-offs between accuracy and memory usage.

HardSystem Design
72 practiced

A long-running pandas job takes hours on a single machine. Outline a step-by-step migration plan to Dask (or Ray DataFrame) including minimal code changes to get started, how to test correctness, common unsupported pandas methods and workarounds, and how to measure and validate performance improvements and scaling behavior.

HardTechnical
76 practiced

Compare using pandas vs executing SQL queries via DuckDB for complex multi-join analytical queries. Provide an example where DuckDB can outperform pandas on a multi-join aggregation, show how to convert a pandas DataFrame to DuckDB for processing and back, and explain I/O and memory trade-offs.

HardTechnical
131 practiced

You want to port a pandas pipeline to GPU using RAPIDS cuDF to accelerate groupby and merge operations. Discuss what pandas APIs are supported by cuDF, what code changes are typically required, how to handle unsupported operations (fallback to CPU), and provide an example replacing pd.read_csv with cudf.read_csv then performing a groupby. Also discuss GPU memory limitations and strategies to handle them.

MediumTechnical
81 practiced

Implement (in Python) a streaming-friendly function that reads inference logs with fields (request_id, model_version, start_ts, end_ts nullable, status) and computes approximate p95 and p99 latencies per model_version over the last 24 hours using a single pass and limited memory. Provide code sketch, explain choice of streaming quantile algorithm (e.g., t-digest), and analyze time and memory complexity.

That is every published Working with Large-Scale Datasets question for AI Engineer so far. Browse the other topics in this category, or practice this one interactively.