Given the heads of two sorted linked lists, merge them into one sorted list using a recursive approach and return the merged list as an array. Input: '[l1], [l2]'.
Input: '[l1], [l2]'.
Output: Array — the merged sorted list.
Input: [1,3,5], [2,4,6]
Output: [1,2,3,4,5,6]
Explanation: Interleaved in sorted order.Input: [], [1,2]
Output: [1,2]
Explanation: One list empty.Input: [1], []
Output: [1]
Explanation: Other list empty.0<=n,m<=5000-10^4<=value<=10^4both sorted ascending