title: Depth First Search on a tree with more than 2 child nodes
body: <p>I am trying to prepare for interviews and I ran into this problem:</p>
  
  <p>Given a root of a tree structure. The method getChildren() returns Node[] array which has all the children of that parent. The question is to check if a given Node x exits in the tree. How would I go about doing this in both an iterative and a recursive manner? It would help of someone could provide the pseudo code for it. I understand that we can do a Depth First search but I am not sure how to do so for a tree in which each element can have any number of child nodes.</p>