I have been asked in my algorithm class to make a K-way merge algorithm which is of O(nlogk)
After searching i found it could be done via making a k length prio
You should not here that "n" the total number of nodes over all the list not just one list. In this case the solution is O(n logk). If we mean that we have n node on an average in every list(total of k lists) then it will be O(nk logk)