Valon·Software Engineer·Technical Phone Screen
- Given an in-memory SQL-like database that supports INSERT and a basic SELECT with filtering, extend SELECT to support ORDER BY with a specified column and direction. Ties in the sort should be broken by insertion order.
- How does sort stability apply here, and what happens if the ORDER BY column contains mixed types or null values?
- What is the time complexity of the full query pipeline including filtering, projection, and sorting?
“The base implementation was straightforward enough, rows as a list of dicts, filter by equality, project columns.”