The same figure is loaded from two places and the totals disagree. Before anyone argues about which is right, they need the list of keys that differ.
left — a list of (key, value)right — the same, from the other sourceKeys are unique within a source.
A list of (key, status) for every key that does not agree, where status is one of:
'ONLY_LEFT' — present on the left, missing on the right'ONLY_RIGHT' — present on the right, missing on the left'MISMATCH' — present on both, with different valuesKeys that agree are not reported. Order is not graded.
left[["a", 1], ["b", 2]]
right[["b", 2], ["c", 3]]
[["a", "ONLY_LEFT"], ["c", "ONLY_RIGHT"]]
left[["a", 1], ["b", 2]]
right[["a", 1], ["b", 2]]
Community-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.