private static TreeNode[] generateTree(boolean[][] matrix) {
		System.out.println("Building Tree Data Structure...");
		//Get the number of nodes we will be generating
		int size = matrix.length;
		if(matrix.length>0)
			size = (size>matrix[0].length) ? size : matrix[0].length;
		else
			return null;
		
		//Generate array of nodes
		TreeNode[] result = new TreeNode[size];
		for(int i=0;i<result.length;i++){
			result[i] = new TreeNode(i);
		}
		
		//Populate array of nodes
		for(int j = 0; j < matrix[0].length; j++) {
			for(int i = 0; i < matrix.length; i++) {
				if(matrix[i][j]) {
					result[j].children.add(result[i]);
				}
			}
		}
		
		return result;
	}