• 04 August

    print all paths from root to leaf in a binary tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 9th part of java binary tree tutorial. In this post, we will see about program to print all paths from root to leaf in a binary tree in java. Below diagram will show all paths […]

  • 20 July

    how to print leaf nodes of a binary tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 7th part of java binary tree tutorial. In this post, we will see about program to print leaf nodes in a binary tree in java Algorithm- Steps for counting number of leaf nodes are: If […]

  • 20 July

    program to count leaf nodes in a binary tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 8th part of java binary tree tutorial. Java Binary tree tutorial: Binary tree in java Binary tree preorder traversal Binary tree postorder traversal Binary tree inorder traversal Binary tree level order traversal Binary tree spiral […]

  • 04 August

    Spiral/Zigzag level order traversal of binary tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 6th part of java binary tree tutorial. In this post, we will see about Spiral/Zigzag Level Order binary tree traversal in java. Spiral/Zigzag Level Order traversal: Spiral/Zigzag Level order traversal of below tree will be: […]

  • 07 April

    Reverse level order traversal of binary tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is part of java binary tree tutorial. In this post, we will see about Reverse Level Order binary tree traversal in java. In previous post, we have already seen Level order traversal. In reverse level order […]

  • 19 July

    Binary Tree Level Order traversal in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 5th part of java binary tree tutorial. In this post, we will see about Level Order binary tree traversal in java. Level Order traversal Level order traversal of below binary tree will be: We will […]

  • 17 July

    Binary Tree PostOrder traversal in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 3rd part of java binary tree tutorial. In this post, we will see about PostOrder binary tree traversal in java. PostOrder traversal In PostOrder traversal, each node is processed after subtrees traversal.In simpler words,Visit left […]

  • 15 July

    Binary Tree InOrder traversal in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. This is 4th part of java binary tree tutorial. In this post, we will see about InOrder binary tree traversal in java. InOrder traversal: In InOrder traversal,each node is processed between subtrees.In simpler words,Visit left subtree, node […]

  • 15 July

    Binary Tree PreOrder traversal in java

    If you want to practice data structure and algorithm programs, you can go through top 100+ data structure and algorithm interview questions. This is 2nd part of java binary tree tutorial. In this post, we will see about PreOrder binary tree traversal in java. PreOrder traversal: In PreOrder traversal,each node is processed before either of its […]