-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
26 lines (14 loc) · 969 Bytes
/
README
File metadata and controls
26 lines (14 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
I created a Graph class where each node was a vector of ints
storing node's neighbors. I used a Hashtable for each intersection
to make it's storing easier, returning an int value;
I checked if there's a road between the starting node and the end node.
If so, i displayed 'y', otherwise, i displayed 'n';
Almost identically to the previous task, i checked if there's a road
between 2 given nodes. If so, i found and displayed distance, otherwise
i displayed "-1".
Depending on the first character of the row(so called decision in
my function) i started doing what i have been asked in the task.
Adding a road, making a bidirectional road, removing a road.
The Queries that started with 'q' have been done in the same way the first
2 tasks have been done. Driver make decision either he can go to a client or not
depending on his location, road accesibility or fuel left in the tank.