Software suppliers are trying to make their software packages more ‘user-friendly’… Their best approach so far has been to take all the old brochures and stamp the words ‘user-friendly’ on the cover. Bill Gates

Split a Circular Linked List into two halves

Language Java | Level Intermediate | Category Data structure | September 5, 2015 11:03 pm

Data structure Description

Circular linked list is a linked list in which the head node previous pointer points to the tail node.

Write a program to split the circular linked list into two halves linked list. Two lists should have split with equal size. If the list has an odd number of elements, split with two nearly half lists.



Create circular linked list which head pointer next node point to tail node of the list
Display circular linked list: 1->2->3->4->5->6->7
Split the circular list 
Display first list: 1->2->3->4
Display second list: 5->6->7



No comments available!

Please login to add comments.