← Meta Interview Insights

Meta·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Meta Production Engineer interview with a coding problem involving CSV file parsing and physics-based computation. Pretty much a data wrangling plus algorithm question dressed up with dinosaurs, which was a fun twist I did not expect.

Questions Asked (1)

Q1

You're given two CSV files with dinosaur data. One has name, leg length, and diet. The other has name, stride length, and stance. Using the formula speed = ((stride_length / leg_length) - 1) * sqrt(leg_length * 9.8), compute each dinosaur's speed. Output only dinosaurs present in both files, sorted by speed descending.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The dinosaur theme threw me off for a second and I spent way too long re-reading the formula instead of just implementing it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem and edge cases, then outline a solution that joins the two datasets on dinosaur name, computes speed using the given formula, and sorts the results in descending order. Discuss the time and space complexity, and consider how you would handle large files or missing data.

Pro tip: Mention that you would validate the formula's inputs (e.g., leg_length > 0) and handle division by zero or negative values gracefully, showing attention to robustness. Also, note that sorting can be done after computing speeds, and if memory is a concern, you could use an external sort or streaming approach.

1. Clarify requirements and edge cases

Ask about file sizes, data types, missing values, and whether names are unique. Confirm the output format and sorting order.

2. Choose data structures and algorithm

Decide to load one file into a hash map for O(1) lookups, then iterate through the other to compute speeds. Alternatively, if files are huge, discuss external sorting or streaming.

3. Implement the join and computation

For each dinosaur present in both files, compute speed using the formula, ensuring leg_length is positive. Store results in a list of tuples (name, speed).

4. Sort and output

Sort the list by speed in descending order and output the names (or full records) as required.

5. Analyze complexity and trade-offs

Discuss time complexity (O(n log n) due to sorting) and space complexity (O(n) for storing results). Mention alternative approaches if data doesn't fit in memory.

Key Points to Mention

  • Hash map for efficient join on dinosaur name
  • Handling edge cases: missing data, zero or negative leg length, division by zero
  • Time complexity: O(n + m + k log k) where n and m are file sizes and k is number of common dinosaurs
  • Space complexity: O(k) for storing results, or O(min(n,m)) for hash map
  • Sorting in descending order: use appropriate comparator or reverse sort
  • Scalability: discuss external sorting or streaming if files are too large for memory

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.