• 10 September

    Implement stack using Linked List in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this program, we will see how to implement stack using Linked List in java. The Stack is an abstract data type that demonstrates Last in first out (LIFO) behavior. We will implement the same behavior using […]

  • 16 April

    Delete a node from binary search tree in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In this post, we will see how to delete a node from binary search tree. There are two parts to it. Search the node After searching that node, delete the node. There are three cases which we […]

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

  • 07 April

    Find Maximum Element in Binary Tree in Java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. 1. Overview In this article, we will explore how to find the maximum element in a binary tree in Java using recursive and iterative solutions. 2. Introduction to Problem Statement Given a binary tree as below: Maximum […]

  • 27 December

    Depth First Search in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. In previous post, we have seen breadth-first search(bfs). In this post, we will see how to implement depth-first search(DFS) in java. Graph traversal Algorithms Breadth first search in java Depth first search in java In DFS,  You […]

  • 27 December

    Breadth first search in java

    If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. We have already seen about breadth first search in level order traversal of binary tree. Graph traversal Algorithms: Breadth first search in java Depth first search in java Breadth first search is graph traversal algorithm. In this […]

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

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