Left View of Tree August 15, 2017 Code: int count=0; void leftview(Node root,int k) { if(root==null) return; if(count<k){ System.out.print(root.data+" "); count=k; } leftview(root.left,k+1); leftview(root.right,k+1); } Email ThisBlogThis!Share to XShare to Facebook tree No Comments
0 Comments:
Post a Comment