From f72178431b0990ce2d895c6b4b0e3c0098e50436 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros <51701672+spirosmaggioros@users.noreply.github.com> Date: Tue, 2 Jul 2024 19:39:26 +0300 Subject: [PATCH] README code change --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3e0ea03e..e299a26c 100644 --- a/README.md +++ b/README.md @@ -40,17 +40,20 @@ int main(){ ... } -// And of course, every data structure that you need! + #include -weighted_graph g("undirected"); -g.add_edge(1, 4, 2); -g.add_edge(4, 5, 6); -g.add_edge(5, 2, 9); -g.add_edge(2, 8, 10); - -// returns the shortest path from 1 to 2. -std::cout << g.shortest_path(1, 2) << '\n'; -g.visualize() // You can visualize almost any of our implemented data structures! + +// And of course, every data structure that you need! +int main(){ + weighted_graph g("undirected"); + g.add_edge(1, 4, 2); + g.add_edge(4, 5, 6); + g.add_edge(5, 2, 9); + g.add_edge(2, 8, 10); + + // returns the shortest path from 1 to 2. + std::cout << g.shortest_path(1, 2) << '\n'; + g.visualize() // You can visualize almost any of our implemented data structures! ``` You can see more [examples](/examples) or follow the [Tutorials](/tutorial).