What is the difference between DELETE and TRUNCATE?
Asked in the Technical round 3 stage. Asked with normalization / normal forms.
Implement an in-memory simulation: DELETE removes records whose IDs are listed, while TRUNCATE removes every record.
records is a list of dictionaries containing an integer id. operation is either "DELETE" or "TRUNCATE". ids is a list of IDs used only by DELETE. Return the remaining records in their original order.
def apply_operation(records, operation, ids):