Code RoomJoin employees and salaries
MediumPrep Room Coding #387

Join employees and salaries

CodingAlgorithms & data structuresEntry–Mid~15 min

Two HR exports must be joined. `employees` rows look like "id,name" and `salaries` rows look like "id,amount" (amount is an integer). Each id appears at most once per list, and names are distinct. Return a list of "name,amount" strings for every id present in both lists, sorted by name ascending. Example: employees ["e1,ava", "e2,raj"] and salaries ["e2,120", "e1,95"] give ["ava,95", "raj,120"].

Implement
join_salaries(employees: list[str], salaries: list[str]) → list[str]
Examples
in[["e1,ava","e2,raj","e3,mia"],["e2,120","e1,95","e4,80"]]out["ava,95","raj,120"]
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 15 min
InputExpectedGot
[["e1,ava","e2,raj","e3,mia"],["e2,120","e1,95","e4,80"]]["ava,95","raj,120"]not run yetsample