Your question is Duplicate Records Detection. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
OpenTable receives reservation records represented as Python dictionaries. Write a function that identifies records appearing more than once, efficiently.
Two records are duplicates when they contain exactly the same key-value pairs, regardless of dictionary insertion order. Return each duplicated record only once, preserving the order of its first appearance in records.
Given records, a list of dictionaries whose keys are strings and whose values are hashable primitives such as strings, integers, booleans, or None, return a list of dictionaries. The result must contain one copy of every record that occurs at least twice.
Do not modify the input list or its dictionaries. If no duplicates exist, return an empty list.
def find_duplicate_records(records):