Skip to content
Reliable Data Engineering
Overview

Python Coding Practice for Data Engineers

Every solution is executed against its tests by scripts/build.py. Run them yourself in the browser with the web platform (Pyodide), or locally: copy the starter, implement, paste the tests.

Read first: The data engineering coding round · Algorithm patterns · Classic DSA problems by pattern: Algorithms track

Easy

#ProblemTopics
01Top-K Most Frequent Search Termshash-map, heap, counting
02Flatten Nested JSON Recordsrecursion, json, schema
03Deduplicate Records Keeping the Latest Versionhash-map, deduplication, cdc
04Parse Web Server Logs into Hourly Status Countsparsing, regex, aggregation
05Merge Two Sorted Event Streams Lazilygenerators, two-pointers, streaming
06Implement GROUP BY with Multiple Aggregateshash-map, aggregation, one-pass
07Validate Records Against a Schemavalidation, data-quality, schema
22Batch a Stream into Fixed-Size Chunksgenerators, itertools, streaming

Medium

#ProblemTopics
08Merge Overlapping Time Intervalsintervals, sorting, sweep
09Peak Concurrent Sessions (Meeting Rooms II)intervals, heap, sweep-line
10K-Way Merge of Sorted Partition Filesheap, merge, streaming
11Sessionize User Eventssliding-window, grouping, sessionization
12Moving Average from a Data Streamsliding-window, deque, design
13LRU Cache for Dimension Lookupsdesign, hash-map, linked-list
14Point-in-Time Lookup (As-Of Join)binary-search, as-of-join, versioning
15Order Pipeline Tasks in a DAG (Topological Sort)graphs, topological-sort, orchestration
16Sliding-Window Rate Limiter for an Ingestion APIsliding-window, deque, design
17Longest Streak of Consecutive Days (O(n))hash-set, streaks, arrays
18Count Time Windows with Exact Revenue Targetprefix-sum, hash-map, arrays
19Running Median of a Latency Streamheap, streaming, percentiles
20Infer a Schema from JSON Recordsschema, json, type-system
21Apply a Daily Snapshot to an SCD Type 2 Dimensionscd2, data-modeling, merge
23Retry Decorator with Exponential Backoff and Jitterdecorators, reliability, error-handling
28Metrics Decorator: Count Calls, Failures and Latencydecorators, closures, observability
29Config-Driven Connector Framework (ABC + Registry)oop, abc, decorators, design
30Atomic Partition Writer (Context Manager)context-managers, idempotency, oop
31Paginated API Reader With Rate Limits (Generator)generators, pagination, retries
33Usage Billing With Historical (Effective-Dated) Ratesbinary-search, scd2, billing
34Render Parent/Child Records as an Indented Treetrees, dfs, hierarchies

Hard

#ProblemTopics
24Uniform Sample from a Stream of Unknown Lengthsampling, streaming, probability
25Consistent Hashing Ring for Shardinghashing, distributed-systems, bisect
26Bloom Filter for Streaming Deduplicationprobabilistic, hashing, deduplication
27Sort Data Larger Than Memory (External Merge Sort)external-sort, heap, generators
32Usage Credit Ledger With Expiring Grantsheap, ledger, design