Posts

Showing posts from January, 2018

Java for English majors

Image
Let me start by saying that I completed a degree in English Literature about 7 years before I completed my degree in Software Engineering. So, when I say "Java for English majors," what I really mean is "Java for Krystal." I've been using  LeetCode  to practice coding and today's focus is Binary Tree traversal/manipulation . For this particular exercise, I needed to grab all of the nodes on a level and find their average. Follow this link for an image to help you understand some of the terminology, if you're not already familiar.  Here's a quick run-through: the circles are called nodes the highest node in the graph is called the root if a circle has another circle beneath it, connected by a line, those circles have a parent/child relationship (respectively) if a circle has multiple circles beneath it, each connected by a line, those attached circles are siblings to one another in a Binary Tree (the kind we're working with), th...