-1

I am currently working on a project for data structures due in a couple days and I do not understand the instructions. We are to make a minimum spanning tree via kruskal's algorithm but also need to implement it using an ArrayBasedList, a heap, up trees, and an adjacency list. 1. These things are very confusing to me, would the heap and the up trees just be an array-based list with the things entered in a different order? or do they need their own classes? 2. What is an adjacency list? I have to return a string version of my heap, my adjacency list, and my mst. I am very nervous/confused, any help understanding how to start this is GREATLY appreciated.

the project is basically to find the minimum spanning tree of lowest cost bridges (edges) between islands (vertexes) so its a weighted graph.

MaddieSun
  • 91
  • 8
  • Did you try google? https://en.wikipedia.org/wiki/Adjacency_list Also, it would be nice if you would react to people who answer your questions. – 1000ml Jul 10 '16 at 15:51
  • I don't know how to react to people on here other than commenting back and upvoting. I did not get the notification for this until just now, I did not mean to be rude I was just not in my email. Thank you for the answer ( ; – MaddieSun Jul 11 '16 at 16:11

1 Answers1

1

You should first distinguish between the purpose of these data-structures. For example, you would use a adjacency list to store the graph information. Where would you use a heap? To process the edges in order. Then find out the different variations you can do with the different data-structures. The data-structures process the information differently so they may have different final time complexities. Once you manage to understand the pieces see how they fit in together and implement the algorithm.

Consult this link for a step-by-step demonstration.

MathBunny
  • 662
  • 6
  • 15