@@ -0,0 +1,988 @@
+package GeeksforGeeksPractice;%0D%0A%0D%0A/*%0D%0A * Link : http://www.geeksforgeeks.org/given-binary-tree-print-nodes-two-given-level-numbers/ %0D%0A */%0D%0Apublic class _0048NodesBetweenLevels %7B%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09TreeNode tn=new TreeNode(20);%0D%0A%09%09tn.left=new TreeNode(8);%0D%0A%09%09tn.right=new TreeNode(22);%0D%0A%09%09tn.left.left=new TreeNode(4);%0D%0A%09%09tn.left.right=new TreeNode(12);%0D%0A%09%09tn.left.right.left=new TreeNode(10);%0D%0A%09%09tn.left.right.right=new TreeNode(14);%0D%0A%09%09printNodes(tn,2,4);%09%09%0D%0A%09%7D%0D%0A%09%0D%0A%09private static void printNodes(TreeNode tn,int low, int high) %7B%0D%0A%09%09for (int i = low-1; i %3C=high; i++) %7B%0D%0A%09%09%09findNodes(tn,i);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09private static void findNodes(TreeNode tn, int level) %7B%0D%0A%09%09if(tn!=null)%0D%0A%09%09%7B%0D%0A%09%09%09if(level==0)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09System.out.println(tn.value);%0D%0A%09%09%09%7D%0D%0A%09%09%09findNodes(tn.left, level-1);%0D%0A%09%09%09findNodes(tn.right, level-1);%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09static class TreeNode%7B%0D%0A%09%09TreeNode left,right;%0D%0A%09%09int value;%0D%0A%09%09public TreeNode(int value) %7B%0D%0A%09%09%09this.value=value;%0D%0A%09%09%7D%09%09%0D%0A%09%7D%0D%0A%0D%0A%0D%0A%7D%0D%0A

print nodes between levels