Question: Given a singly linked list L, write the function to split the linked list into k groups of different size Example: Input: L: 1->3->2->5->6->7->4->9->13 Number
Given a singly linked list L, write the function to split the linked list into k groups of different size Example: Input: L: 1->3->2->5->6->7->4->9->13 Number of groups k = 3 Size of 1st group = 2, 2nd group = 3, 3rd group = 4 Output: L1: 1-> 3, L2: 2->5->6, L3: 7->4->9->13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
