Explain how you would merge sorted arrays externally (approach only, no coding).
Asked in the Codility coding interview stage. Discussed approach only.
For this coding version, implement the approach as merge_sorted_arrays(arrays). The input is a list of individually sorted integer arrays. Return one sorted array containing every value exactly once per occurrence. Treat each input array as an external sequential stream: do not concatenate all inputs and sort them. Use a min-heap to retain the current value from each non-exhausted array.
def merge_sorted_arrays(arrays):