Code RoomValidate required settings
EasyPrep Room Coding #711

Validate required settings

CodingAlgorithms & data structuresEntry–Mid~10 min

A service refuses to boot unless certain settings exist. You get the config file as lines plus the list of required setting names (all distinct). Parse the lines: trim each; ignore empty ones and ones starting with "#"; split the rest at the first "=" with key and value trimmed; a name assigned several times keeps its last value. A requirement is satisfied only when the name was assigned AND its final value is non-empty after trimming. Return the unsatisfied names sorted alphabetically. Example: lines ["port=8080", "host="] with required ["port", "host"] returns ["host"].

Implement
missing_settings(lines: list[str], required: list[str]) → list[str]
Examples
in[["port=8080","host="],["port","host","token"]]out["host","token"]
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 10 min
InputExpectedGot
[["port=8080","host="],["port","host","token"]]["host","token"]not run yetsample