cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How to hard code a graph?
How to hard code a graph?
Apr 2, 2016 at 11:54pm UTC
DeathLeap
(221)
I am trying to implement Dijsktra algorithm and I must use this graph to find the shortest path from node 20 to 21.
https://i.gyazo.com/6f98ea61568771f0e80d433990928f7e.png
I want to know how can I hard code this?
How can I start solving this problem. I need your advice.
Thank you guys!
Apr 3, 2016 at 12:40am UTC
ne555
(10692)
> I want to know how can I hard code this?
Don't.
Just read from a file.
Apr 3, 2016 at 12:56am UTC
DeathLeap
(221)
What I don't understand is how can I specify that a node has three edges if I am going to read from a file?
How can I do that?
Last edited on
Apr 3, 2016 at 12:57am UTC
Apr 3, 2016 at 2:58am UTC
cire
(8284)
Use a container?
Topic archived. No new replies allowed.