Delete Kth nodes from the beginning and end of a Linked List
Given a singly Linked List and an integer K denoting the position of a Linked List, the task is to delete the Kth node from the beginning and end of the Linked List. Examples: Input: 1 ? 2 ? 3 ? 4 ? 5 ? 6, K = 3Output: 1 ? 2 ? 5 ? 6Explanation: Deleted Nodes : 3, 4 Input: 1 ? 2 ? 3 ? 4 ? 5 ? 6, K =