@aambazinga in case of inplace with linked list it should take $O(n^2)$ time. Right?
@Shubhanshu no it's O[nlogn] see this it will be clear. https://www.geeksforgeeks.org/merge-sort-for-linked-list/
64.3k questions
77.9k answers
244k comments
80.0k users