PracHub
QuestionsLearningGuidesInterview Prep

Quick Overview

This question evaluates data manipulation and engineering competencies by testing Python proficiency with nested data structure handling, complexity analysis and test-case design, alongside SQL proficiency in UTC-aware aggregation and per-user deduplication to compute daily active users; it is categorized as Data Manipulation (SQL/Python) within the data engineering domain. Such problems are commonly asked to assess practical implementation ability and robustness under edge cases, as well as conceptual understanding of time/space complexity and correct date-time handling, reflecting a primarily practical application with elements of conceptual analysis.

  • medium
  • Meta
  • Data Manipulation (SQL/Python)
  • Data Engineer

Solve Python and SQL data tasks

Company: Meta

Role: Data Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

Complete both tasks: 1) Python: Implement a function flatten(nested) that takes a list whose elements are integers or arbitrarily nested lists of integers and returns a single flat list of integers in left-to-right order. Avoid recursion if nesting depth may be large. State time and space complexity and include simple tests covering empty input, deep nesting, and invalid element types. 2) SQL: Given events(user_id INT, event_time TIMESTAMP, event_type STRING), write a query that returns, for each UTC calendar date, the count of distinct active users (DAU). Deduplicate multiple events per user per day and ensure event_time is interpreted in UTC. Output columns: event_date, dau.

Quick Answer: This question evaluates data manipulation and engineering competencies by testing Python proficiency with nested data structure handling, complexity analysis and test-case design, alongside SQL proficiency in UTC-aware aggregation and per-user deduplication to compute daily active users; it is categorized as Data Manipulation (SQL/Python) within the data engineering domain. Such problems are commonly asked to assess practical implementation ability and robustness under edge cases, as well as conceptual understanding of time/space complexity and correct date-time handling, reflecting a primarily practical application with elements of conceptual analysis.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 8,500+ 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.

Related Coding Questions

  • Calculate Daily Survey Response Rates by Country - Meta (medium)
  • Compare Survey Satisfaction for New and Established Users - Meta (medium)
  • Find A Low-Quality Annotator From Label Data - Meta (hard)
  • Analyze Thirty-Day Ad Performance with SQL - Meta (medium)
  • Compute Each Advertiser's Share of Shop Ad Spend - Meta (medium)