Skip to content

presenter-adjacency-lists ​

Guide: /guide/algorithms/graph/presenter-adjacency-lists

Signature ​

ts
presenterAdjacencyLists(graph);

Params: ​

NameTypeRequiredDefaultDescription
graphIGraph<T>+Graph to copy

Returns: ​

ReadonlyMap<T, ReadonlySet<T>> ​

A snapshot. Copying costs O(V + E). Later graph edits are not visible in the map, and editing the map does not change the graph.


MIT Licensed