Data Structured57_q1_sparse

Sparse Graph

43a99b14-9f2a-4e90-bfca-7797d761a95e.cppC++
1// Loading code...

Selected Submission

100 / 100
0.39s
114016 KB
ArrayHashMap
Time Comp.
O(E) for AddEdge/RemoveEdge, O(V+E) for Transpose, where V is the number of vertices and E is the number of edges.
Space Comp.
O(V+E)
Readability
7/10

"The code implements a graph using an array of sets, where each set stores the neighbors of a vertex. This utilizes the "Set" data structure for adjacency representation and "Array" for storing the sets."

History

AttemptPoints Time
Try #1410010/22/2024
Try #132010/22/2024
Try #1210010/22/2024
Try #1110010/22/2024
Try #1010010/22/2024
Try #910010/22/2024
Try #8010/22/2024
Try #78010/22/2024
Try #6010/22/2024
Try #510010/22/2024
Try #49010/21/2024
Try #38010/21/2024
Try #29010/21/2024
Try #18010/21/2024