← ALL NOTES
Array

2570. Merge Two 2D Arrays by Summing Values

Given two 2D arrays nums1 and nums2, each of [id, value] entries, sorted ascending by id, with unique ids within each array. Merge them: for shared ids the values are summed, and the result is sorted…

Loading…