What will be the asymptotic time complexity to insert an element at the front of the linked list head is known O Ono n2 O n3?

Merge K sorted linked lists | Set 1

Given K sorted linked lists of size N each, merge them and print the sorted output.

Examples:

Input: k = 3, n = 4 list1 = 1->3->5->7->NULL list2 = 2->4->6->8->NULL list3 = 0->9->10->11->NULL Output: 0->1->2->3->4->5->6->7->8->9->10->11 Merged lists in a sorted order where every element is greater than the previous element. Input: k = 3, n = 3 list1 = 1->3->7->NULL list2 = 2->4->8->NULL list3 = 9->10->11->NULL Output: 1->2->3->4->7->8->9->10->11 Merged lists in a sorted order where every element is greater than the previous element.