Code RoomCSV line parsing
MediumPrep Room Coding #195

CSV line parsing

CodingNetworking & APIsAlgorithms & data structuresEntry–Senior~20 min

Parse a single CSV line into fields, respecting RFC 4180 quoting. Fields are comma-separated. A field may be wrapped in double quotes, inside which commas are literal and a doubled quote ("") represents a single literal quote character. Return the list of field strings (quotes removed, escapes resolved). An empty input string yields a list containing one empty string.

Implement
parse_csv_line(line: str) → list[str]
Examples
in["\"hello, world\",x"]out["hello, world","x"]
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 20 min
InputExpectedGot
["\"hello, world\",x"]["hello, world","x"]not run yetsample