Question: 1. Implement a LinkedList data structure using one of your preferred language. Now given a linked list, write a function/method that shuffles the nodes in

1. Implement a LinkedList data structure using one of your preferred language. Now given a linked list, write a function/method that shuffles the nodes in a way that the all originally odd-numbered nodes are placed before the even-numbered nodes. Note: Thie number is the original index of the given linked list and has nothing to do with the data stored. For example: a linked list of #l->#-->#3->#4->#5 should be converted into #1. >#3->#5->#2->#4 1) 2) Write an algorithm that detects whether there are loops inside the linked list. Analyze the algorithm complexity 3) Improve the aforementioned algorithm by returning the node in the linked list where the loop starts. Returns None if no loops are detected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
