Limited access

Upgrade to access all content for this subject

The World Wide Web can be considered one giant graph where web pages are the nodes of the graph and hyperlinks are the directed edges connecting the nodes to each other. There are several ways to represent a graph like this.

Which of the following options is the best way of representing this graph?


A 2-dimensional array where the web pages are the rows and columns of the array. An index in the array has a value of 1 if the row web page has a hyperlink to the column web page and a 0 otherwise.


A binary heap where each web page is ranked by the number of hyperlinks it has to other web pages.


An adjacency list where each web page in the graph has an unordered list of the web pages that it has hyperlinks to.


A hash table where each web page is hashed based on the number of hyperlinks that point to it from other web pages.

Select an assignment template