← 返回 microsoft 的题目列表Implement a SQL-like WHERE filter for in-memory rows
类型:online_judge
You are given an in-memory “table” represented as a list of rows; each row is a mapping from column name to value (e.g., { "age": 18, "name": "bob" }). Implement a where filtering function: given (1) all rows and (2) a filter condition (predicate/expression), return all rows that satisfy the condition while preserving the original relative order.
The exact supported operators/grammar should follow the interviewer’s specification; at minimum, it should support filtering by comparing a column against a constant (e.g., age > 30, name == "alice").
Note: The source only mentions “the 3rd question implements a where feature” without full details (operators, grammar, types, constraints), so it cannot be fully reconstructed into a judge-ready problem statement; kept here as an interview-question summary.