Code RoomDiff config changes
MediumPrep Room Coding #710

Diff config changes

CodingAlgorithms & data structuresEntry–Mid~14 min

Before rolling out, a deploy pipeline prints how the proposed config differs from what is currently running. Both configs arrive as lines; parse each the usual way: trim, drop blanks and "#" comments, split at the first "=", trim key and value, repeated keys keep the final value. Produce one report entry per differing key: "+ key" when only the proposal has it, "- key" when only the running config has it, and "~ key" when both have it with different values. Order the report alphabetically by key name and return it as a list of strings. Identical keys produce nothing.

Implement
config_drift(current: list[str], proposed: list[str]) → list[str]
Examples
in[["a=1","b=2"],["b=3","c=4"]]out["- a","~ b","+ c"]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

0:00 of about 14 min
InputExpectedGot
[["a=1","b=2"],["b=3","c=4"]]["- a","~ b","+ c"]not run yetsample