Code Room
CodingMediumcod-g1209
Subject Data wranglingLevel Entry–Mid~15 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

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.

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.