@@ -0,0 +1,1168 @@
+package com.sunny.grokkingalgorithms.fasttrack.week1;%0A%0Aimport com.sunny.grokkingalgorithms.ctci.c4.util.BinaryTreeNode;%0Aimport com.sunny.grokkingalgorithms.ctci.c4.util.TreeUtils;%0A%0A/**%0A * Created by sundas on 6/21/2018.%0A */%0Apublic class CheckIfBinaryTreeIsFull %7B%0A%0A  /**%0A   *%0A   * @param root%0A   * @return%0A   */%0A  public static boolean isFull(BinaryTreeNode root)%7B%0A    if(root ==  null)%7B%0A      return true;%0A    %7D%0A    if(root.right == null%0A        && root.right == null)%7B%0A      return true;%0A    %7D%0A    if((root.left != null && root.right == null) %7C%7C%0A        (root.left == null && root.right != null))%7B%0A      return false;%0A    %7D%0A    boolean leftSubTreeFull = isFull(root.left);%0A    boolean rightSubTreeFull = isFull(root.right);%0A    return leftSubTreeFull && rightSubTreeFull;%0A  %7D%0A%0A  /**%0A   *%0A   * @param args%0A   */%0A  public static void main(String%5B%5D args) %7B%0A    BinaryTreeNode root = TreeUtils.createBalancedBinaryTree();%0A    TreeUtils.performBfsLevelMarker(root);%0A    System.out.println(isFull(root));%0A    System.out.println(%22##################%22);%0A    root = TreeUtils.createBST();%0A    TreeUtils.performBfsLevelMarker(root);%0A    System.out.println(isFull(root));%0A  %7D%0A%0A%7D%0A

Check if a binary tree is full.