title: Determine average of all Node values within a Tree Structure
body: <p>Given this interface...</p>
  
  <pre><code>public static interface Node 
  {
      int getValue();
      List&lt;Node&gt; getChildren();
  }
  </code></pre>
  
  <p>Implement the following method to return the average of all node values in the tree.</p>
  
  <pre><code>public static double getAverage(Node root) 
  {
  }   
  </code></pre>
  
  <p>I'm having an extremely hard time with this practice problem and have a few questions.</p>
  
  <ol>
  <li>I assume this is best completed using recursion, is that correct?</li>
  <li>Is this possible without a helper method or global variables?</li>
  <li>Is this possible without having to traverse the tree twice? (Once for node sum, once for node count)</li>
  </ol>
  
  <p>Additionally, if someone could provide some psuedo-code, I'd greatly appreciate it.</p>