Question: 38 What is an appropriate data structure for storing weights in a small graph with less than 100 nodes? A 2D array where an [0


38 What is an appropriate data structure for storing weights in a small graph with less than 100 nodes? A 2D array where an [0 element held he weight from node i to node j A tree in which a node's children represented the edges from it, with the node's values containing the weights. An array of linked lists where the weight is hashed to indicate where the resulting i to j connection information can be found. A singly linked list where each node contains values for the source node, the destination node, and the weight between the two
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
