Created
August 19, 2020 20:10
-
-
Save esys/1893f8a1f5744fb3daee174b48056382 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wg sync.WaitGroup | |
func DFRecImproved(n *Node){ | |
if n == nil { | |
return | |
} | |
wg.Add(1) | |
go DFRecImproved(n.Left) | |
n.Process() | |
wg.Add(1) | |
go DFRecImproved(n.Right) | |
wg.Done() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment