0% found this document useful (0 votes)
86 views3 pages

Activity (Tracing The Algorithm) : Perform The Following Operations On The Singly Linked List

This document contains instructions and diagrams for tracing the execution of various algorithms on a singly linked list, including inserting nodes at different locations, deleting nodes, and more. Students are asked to determine the values of variables and node references at specific points during the execution of each algorithm.

Uploaded by

soma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views3 pages

Activity (Tracing The Algorithm) : Perform The Following Operations On The Singly Linked List

This document contains instructions and diagrams for tracing the execution of various algorithms on a singly linked list, including inserting nodes at different locations, deleting nodes, and more. Students are asked to determine the values of variables and node references at specific points during the execution of each algorithm.

Uploaded by

soma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Ministry of Manpower

Nizwa College of Technology


Department of Information Technology
Course Code: ITSE205/ITSE3101 – Lecturer Name: T V Sathyanarayana/ Sonia V Soans
Course Title: Data Structure and Algorithms
Semester: ( III ) 2018 – 2019

Activity (Tracing the Algorithm)


Perform the following operations on the Singly Linked List:

45 1200 5 2200 66 NULL

1010 1200 3430

start trv

76 NULL

4355
temp

1. What is the value for the following as per the InsertAtLocation() algorithm where
loc is 2?
a. temp ->next:___________________

b. trv ->next:_____________________

4 2300 25 5670 96 NULL

3125 2300 5670

start trv temp

2. What is the value for the following as per the deleteAnyMiddleNode() algorithm
where data is 25?
a. trv ->next:___________________

b. temp->next:_____________________

Page 1 of 3
Ministry of Manpower
Nizwa College of Technology
Department of Information Technology
Course Code: ITSE205/ITSE3101 – Lecturer Name: T V Sathyanarayana/ Sonia V Soans
Course Title: Data Structure and Algorithms
Semester: ( III ) 2018 – 2019

45 1200 5 2200 66 NULL

1010 1200 3430

start trv

76 NULL

4355
temp

3. What is the value for the following as per the InsertAsEnd() algorithm ?
a. trv->next:___________________

b. temp:_____________________

45 1200 5 2200 66 NULL

1010 1200 3430

start

76 NULL

4355
temp

4. What is the value for the following as per the InsertAsStart() algorithm?
a. temp ->next:___________________

b. start:_____________________

c. Temp:_________________________

Page 2 of 3
Ministry of Manpower
Nizwa College of Technology
Department of Information Technology
Course Code: ITSE205/ITSE3101 – Lecturer Name: T V Sathyanarayana/ Sonia V Soans
Course Title: Data Structure and Algorithms
Semester: ( III ) 2018 – 2019

45 1200 5 2200 66 NULL

1010 1200 3430

start trv

5. What is the value for the following as per the deleteFirstNode() algorithm?
a. trv:___________________

b. start:_____________________

45 1200 5 2200 66 NULL

1010 1200 3430

start
trv temp

6. What is the value for the following as per the deleteLastNode() algorithm?
a. trv:___________________

b. temp:_____________________

Page 3 of 3

You might also like