Question d’entretien chez Twin Health

Merge k sorted Array lists

Réponse à la question d'entretien

Utilisateur anonyme

3 août 2022

I solved it using priority queue. Added all the elements from list to minHeap priority queue and then added them one by one to the result list. For this the Runtime : O(n*mlog(n*m)) and Space complexity : O(n*m). Expected Runtime : O(n Log k)