← Questions
Select fields and filter rows from structured records
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
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
