Refactor: Replace std::map and std::set with unordered versions
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#ifndef GRAPH_H_
|
||||
#define GRAPH_H_
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <ostream>
|
||||
#include <ranges>
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
std::uint16_t E();
|
||||
|
||||
// Adjacency matrix representation
|
||||
std::map<T, std::set<T>> adjList;
|
||||
std::unordered_map<T, std::unordered_set<T>> adjList;
|
||||
|
||||
friend std::ostream& operator<<<>(std::ostream& os, Graph<T>& G);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user