1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: add more graphs examples, fix typo (#17113)

This commit is contained in:
Keito Tobichi
2023-01-26 04:58:44 +09:00
committed by GitHub
parent 86f8c55107
commit 6bb930591e
3 changed files with 86 additions and 5 deletions

View File

@@ -60,9 +60,8 @@ fn departure(mut queue []string) string {
// Creating aa map to initialize with of visited nodes .... all with false in the init
// so these nodes are NOT VISITED YET
fn visited_init(a_graph map[string][]string) map[string]bool {
mut array_of_keys := a_graph.keys() // get all keys of this map
mut temp := map[string]bool{} // attention in these initializations with maps
for i in array_of_keys {
for i, _ in a_graph {
temp[i] = false
}
return temp