Loading...

The Merge

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior

Problem

Our distributed query engine merges sorted result shards from multiple nodes. Write a function that takes two already-sorted lists and returns a single sorted list containing all elements - without using the built-in sort, since we need the O(n) merge guarantee.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.