aboutsummaryrefslogtreecommitdiff
path: root/find_path_graph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'find_path_graph.cpp')
-rw-r--r--find_path_graph.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/find_path_graph.cpp b/find_path_graph.cpp
index 0fae12b..9f6c8ae 100644
--- a/find_path_graph.cpp
+++ b/find_path_graph.cpp
@@ -2,7 +2,7 @@
class Solution {
public:
- bool validPath(int n, vvd(int) & edges, int source, int destination) {
+ bool validPath(int n, vvd & edges, int source, int destination) {
vector<int> ds(n, -1);
for (auto &e : edges) {
int p1 = find(ds, e[0]), p2 = find(ds, e[1]);
@@ -20,7 +20,7 @@ private:
int main() {
Solution obj;
- vvd(int) edges = {{0, 1}, {1, 2}, {2, 0}};
+ vvd edges = {{0, 1}, {1, 2}, {2, 0}};
if (obj.validPath(3, edges, 0, 2))
cout << "true";
else