DSs - Lab 3 Manual - DCLL
DSs - Lab 3 Manual - DCLL
LPoint will point to the node in the left side (or previous node) that is LPoint will hold the address of the
previous node. RPoint will point to the node in the right side (or next node) that is RPoint will hold the
address of the next node. DATA will store the information of the node.
A node in the doubly linked list can be represented in memory with the following declarations.
All the operations performed on singly linked list can also be performed on doubly linked list. These are
creation, insertion, deletion, searching, traversal, and concatenation. See the ff. insertion and deletion
of nodes.
Asmelash Girmay
Department of Information Technology
IT3201 Data Structures
Lab3 Manual –Linked List II
2. Deletion of a node
Will be added soon. Still then, please use the algorithim we used singly linked list deletion from any
position. Cheers.
Asmelash Girmay
Department of Information Technology
IT3201 Data Structures
Lab3 Manual –Linked List II
It is also important to note that, every node in a linked list can contain multiple data part, whereas fixed
number of pointers according to their type. However, still, if the linked list is multiply linked list, it can
have more than two pointers in addition to the number of data part.
Asmelash Girmay
Department of Information Technology
IT3201 Data Structures
Lab3 Manual –Linked List II
Lab Exercise
Scenario 3201-02
Yared Melody is a music producer company located in Mekelle city, Tigrai, Ethiopia. Currently, it is working
on music with their clips mass productions. To increase its audiences and thus its revenues, it is planning
to publish a website for mp3 player. With the web application, its employees shall upload, delete, and/or
update the audio versions of each music and make available for their online customers. For this, they
consult Geez IT consulting company and are told to outsource the system to MIT IT3 students of 2018/19.
Assume that you are one member of the established project team. Propose a model of the online music
player and implement it using appropriate data structure/s. Here, each music has an ID, a title, artist, year
of production, album, genre, etc. The player shall have the following features:
• It shall enable listeners to listen the next music by pressing a forward button,
• It shall enable listeners to listen previous music by pressing the backward button,
• It shall enable listener to listen all available music by pressing the repeat all button.
• Finally, a listener shall click on play button to listen selected music and navigate around it with
the other features.
A. Aregawi, one of the employees at Yared Melody added a new music with ID = 527, and title =
“track 1”,
B. Then, immediately after the first music was uploaded, he also added another new music, with
system generated ID = 528, and title = “track 2”,
C. Reda’e, one of the online customers is playing both music, track 1 and track 2 from his PC,
D. Reda’e repeats all music to listen them again,
E. Aregawi added another third music with ID = 619 and title = “track 3”,
F. Unfortunately, the music (“track 3”) was under production, thus ordered to remove it from the
system, and then he deleted it.
G. Finally, Aregawi was un happy with the upload functionality. As a result, he uploads three music
at the same time using the upload multiple form provided. Each music has ID = 432, 564, and 906;
and title = “track 4”, “track 5”, and “track 6” respectively,
H. Being at the last music, “track 6”, Reda’e wants to search for a music with title “track 4”, because
he likes it.
Asmelash Girmay
Department of Information Technology
IT3201 Data Structures
Lab3 Manual –Linked List II
P.S., For queries, contact your lab assistant. In each lab work show your works to the lab assistant for
confirmation.
• How can you model a feature for a repeat one at step H above using your choice data structure?
• When does repeat all and repeat one have the same model and implementation?
• How can you model a shuffle feature of the online audio player application?
Finally, please show your overall work products to the lab assistant. Then, compress your works, maybe
to .zip, upload them through the eLearning form provided before the deadline set on it.
Asmelash Girmay
Department of Information Technology