Question: Question 2. [Marks: 12]| a) You are given a one-way linked list and a two-way linked list and asked to perform the [4] following

Question 2. [Marks: 12]| a) You are given a one-way linked list

Question 2. [Marks: 12]| a) You are given a one-way linked list and a two-way linked list and asked to perform the [4] following operations. i. Traversing the list to process cach node. ii. Deleting a node whose location Loc is given. Searching an unsorted list for a given element ITEM. iv. Scarching a sorted list for a given clement ITEM. Inserting a node before the node with a given location LOC. Which linked list will you use for which operation? You can focus on the advantages of a list over another for different operations. Explain your answer. b) Build a minheap using following data and use heap sort to sort the data in descending order. [5] I11. V. 30, 50, 22, 33, 40, "last two digits of your ID", 11, 60, 22, 55 c) "Given a directed graph G, both BFS and DFS from a particular starting vertex s will [3] traverse the same set of vertices." Do you agree with this statement? Justify your answer.

Step by Step Solution

3.56 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a The two way linked ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Engineering Questions!