Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
a The two way linked ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started