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

examples: fix typos (#18229)

This commit is contained in:
Turiiya
2023-05-25 15:54:46 +02:00
committed by GitHub
parent caee3935a5
commit 993546a0a2
28 changed files with 89 additions and 89 deletions

View File

@ -2,7 +2,7 @@
// I follow literally code in C, done many years ago
fn main() {
// Adjacency matrix as a map
// Adjacency matrix as a map
// Example 01
graph_01 := {
'A': ['B', 'C']
@ -44,7 +44,7 @@ fn depth_first_search_path(graph map[string][]string, start string, target strin
// check if this node is already visited
if visited[node] == false {
// if no ... test it searchin for a final node
// if no ... test it and search for a final node
visited[node] = true // means: node visited
if node == target {
path = build_path_reverse(graph, start, node, visited)
@ -93,7 +93,7 @@ fn build_path_reverse(graph map[string][]string, start string, final string, vis
for i in array_of_nodes {
if current in graph[i] && visited[i] == true {
current = i
break // the first ocurrence is enough
break // the first occurrence is enough
}
}
path << current // updating the path tracked