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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user