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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2021/06/60be7692555a9_IMG20210605111237144.jpg)
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
a The two way linked ... View full answer
Get step-by-step solutions from verified subject matter experts
