Skip to content

Instantly share code, notes, and snippets.

@esys
Created August 19, 2020 20:09
Show Gist options
  • Save esys/59e730544a89e007b02bde21537c6888 to your computer and use it in GitHub Desktop.
Save esys/59e730544a89e007b02bde21537c6888 to your computer and use it in GitHub Desktop.
func main() {
start := time.Now()
n := NewNode(1)
n.Left = NewNode(2)
n.Right = NewNode(3)
n.Left.Left = NewNode(4)
n.Left.Right = NewNode(5)
n.Right.Left = NewNode(6)
n.Right.Right = NewNode(7)
n.Right.Right.Left = NewNode(8)
DFRec(n)
fmt.Printf("took %v", time.Now().Sub(start))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment