W Energy Software Interview Question

Merge list items based on a common key