You are on page 1of 2

Data Structures

Lab Activity 5

Objectives:
The objective of this laboratory is to learn how to implement a circular linked list, including the
implementation of some basic methods of insert, delete and replace.

Overview:
Singly linked list traverses in only one direction, whereas the doubly linked list
traverses in both forward and backward direction. Here in this program we will use both types of
linked lists and make a circular list out of them.

Current= tail.next; (takes you to the head node)


Head.previous (takes you to the tail node in doubly linked list)

Elements:
The elements in a list are of generic type Object

Structure:
The elements form a circular structure. It is pretty much same as the linked list structure. There
is a beginning of the list called head which is linked with the tail of the list. The ordering of the
elements is determined, as it is done in the linked list, by when and where each element is
inserted into the list. You travel through the list using operations that change the position of the
cursor.

Lab Exercise :
You are provided with 2 classes CircularDoublyLinkList.java and CircularDriver.java. You are
required to create the following methods in the class and submit on LMS:
· insert()
· remove()
· get()
· iterateForward()
· iterateBackward()
· Check_Circular()

---------------------------------------- Good Luck -----------------------------------------------------------

You might also like