See https://play.golang.org/p/u4E6mrios0 for the completed code from this video.
In this video we learn how to represent a binary tree in Go code. Once we have the basic structure in place, we then go a step further and define an input file format that we can use to read in arbitrary binary trees moving forward to test our algorithms with.
This post is part of the Let's Learn Algorithms series where we learn how algorithms work, see how to implement them, and then spend some time working on practice problems to reinforce how the implementation details work, as well as to help you learn to recognize problems that could be solved using any particular algorithm.
The series is inspired by feedback on reddit and based on my personal experience with teachers and programming team coaches that I had the pleasure of working with at UCF. If you have any feedback, feel free to reach out - email@example.com.
You can view all of the videos in the Let's Learn Algorithms Graph Theory subsection to see if there is one covering a particular topic you are interested in. You can also check out the transcripts for the video below.
The transcripts below are generated automatically. They aren’t that good and have many errors, but hopefully they help a little bit. If you want you can send corrections for any timestamp.
This article is part of the series, Let's Learn Algorithms.
Sign up for my mailing list and I'll send you a FREE sample from my course - Web Development with Go. The sample includes 19 screencasts and the first few chapters from the book.
You will also receive emails from me about Go coding techniques, upcoming courses (including FREE ones), and course discounts.
Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.
Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.
More in this series
This post is part of the series, Let's Learn Algorithms.
Spread the word
Did you find this page helpful? Let others know about it!
Sharing helps me continue to create both free and premium Go resources.
Want to discuss the article?
See something that is wrong, think this article could be improved, or just want to say thanks? I'd love to hear what you have to say!
You can reach me via email or via twitter.
©2018 Jonathan Calhoun. All rights reserved.