Code Room
CodingEasycod-g1502
Subject Config parsingLevel Entry–Mid~12 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

Your deploy tool reads an INI-style file, already split into lines. A line like "[server]" switches the active section (the name is trimmed). A line "key=value" records a setting: split on the first "=" and trim both sides. Blank lines, lines whose first non-space character is "#", and stray lines without "=" are skipped. Return a dict mapping "section.key" to the value; settings that appear before any section header use the bare key. When the same full key is assigned twice, the later assignment wins. Example: ["[server]", "port = 8080"] yields {"server.port": "8080"}.

Implement
parse_deploy_config(lines: list[str]) → dict[str,str]
Examples
in[["[server]","port = 8080","host=example.com"]]out{"server.host":"example.com","server.port":"8080"}
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.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.