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
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #14 | 100 | 10/22/2024 |
| Try #13 | 20 | 10/22/2024 |
| Try #12 | 100 | 10/22/2024 |
| Try #11 | 100 | 10/22/2024 |
| Try #10 | 100 | 10/22/2024 |
| Try #9 | 100 | 10/22/2024 |
| Try #8 | 0 | 10/22/2024 |
| Try #7 | 80 | 10/22/2024 |
| Try #6 | 0 | 10/22/2024 |
| Try #5 | 100 | 10/22/2024 |
| Try #4 | 90 | 10/21/2024 |
| Try #3 | 80 | 10/21/2024 |
| Try #2 | 90 | 10/21/2024 |
| Try #1 | 80 | 10/21/2024 |