• 06 November

    Vertical sum 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 10th part of java binary tree tutorial. In this post, we will see how to print vertical sum of binary tree nodes in java. Below diagram will show vertical sum for binary tree. Algorithm: Steps […]

  • 04 August

    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 1st part of 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 order traversal Binary tree […]

  • 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 […]

  • 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: […]

  • 20 July

    How 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. 1. Introduction In this post, we will see how to count leaf nodes in a binary tree in Java. Understanding how to count leaf nodes is useful for various applications in computer science, such as calculating […]

  • 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. 1. Introduction In this post, we will see how to count leaf nodes in a binary tree in Java. Understanding how to count leaf nodes is useful for various applications in computer science, such as calculating the […]

  • 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. 1. Introduction This article provides a detailed exploration of the Level Order traversal technique in binary trees, focusing on its implementation in Java. 2. What is Level Order Traversal? Level Order traversal involves visiting all nodes at […]

  • 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. 1. Introduction In this article, we will explore the concept of PostOrder traversal in binary trees, focusing on its implementation in Java. In computer science, a binary tree is a foundational data structure, and traversing it is […]

  • 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. 1. Introduction In this article, we will explore the concept of InOrder traversal in binary trees, focusing on its implementation in Java. In computer science, a binary tree is a foundational data structure, and traversing it […]