← Questions

Select fields and filter rows from structured records

0
StripeCodingLast asked Sep 2026

You get a schema (a list of field names) and records whose values line up with it. Implement a tiny query: given the fields to return and a list of equality filters (field and expected value), return the selected fields of every record that passes all filters, in record order and in the requested field order.

If any requested or filtered field is not in the schema, the whole query is invalid. No filters means every record matches. Think about how you map names to positions once rather than per record.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding