Question
***PLEASE FOLLOW THE INSTRUCTION BELOW C++ Dijkstra's Algorithm Feel free to use STL for this project. Write a Dijkstra's Algorithm with 5 FUNCTIONS BELOW (in
***PLEASE FOLLOW THE INSTRUCTION BELOW
C++ Dijkstra's Algorithm Feel free to use STL for this project. Write a Dijkstra's Algorithm with 5 FUNCTIONS BELOW (in bold): void addVertex(std::string label) Creates and adds a vertex to the graph with label. No two vertices should have the same label. void removeVertex(std::string label) Removes the vertex with label from the graph. Also removes the edges between that vertex and the other vertices of the graph. void addEdge(std::string label1, std::string label2, unsigned long weight) Adds an edge of value weight to the graph between the vertex with label1 and the vertex with label2. A vertex with label1 and a vertex with label2 must both exist, there must not already be an edge between those vertices, and a vertex cannot have an edge to itself. void removeEdge(std::string label1, std::string label2) Removes the edge from the graph between the vertex with label1 and the vertex with label2. A vertex with label1 and a vertex with label2 must both exist and there must be an edge between those vertices unsigned long shortestPath(std::string startLabel, std::string endLabel, std::vector
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started