Question d’entretien chez Capital One

Given an array of sorted linked lists (so each array element is a pointer to some node), return ONE linked list that's sorted.

Réponse à la question d'entretien

Utilisateur anonyme

27 sept. 2017

Pretty much, just keep checking until entire array is empty. If it's not empty, iterate and find the smallest element in the array and add it to your returning linked list. Since the linked lists are already sorted, finding the smallest element every time will also result in a sorted linked list. Return the linked list once you're done.

1