Problem 2722 · Medium

Join Two Arrays by ID

Index the first array’s objects by id in a hash map, then merge each second-array object into the entry with the same id.

Open the interactive visualisation