Algorithm
- 15 April
Find minimum and maximum elements in 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 find minimum and maximum elements in binary search tree. Finding minimum element: Minimum element is nothing but leftmost node in binary search tree, so traverse left until you get […]
- 14 April
Lowest Common Ancestor (LCA) of 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 find lowest common ancestor(LCA) of two nodes in binary search tree. We have already seen how to find LCA in binary tree. It is much simple than that. Lets […]
- 14 April
Lowest Common Ancestor (LCA) of binary 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 find lowest common ancestor(LCA) of two nodes in binary tree. Lets understand with example. As you can see here, LCA is nothing but lowest common parent of two nodes. […]
- 13 April
Boundary 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. In this post, we will see boundary traversal of binary tree in java. Lets understand boundary traversal of binary tree with example: If you look closely to above diagram, boundary traversals can be divided into three essential […]
- 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 […]
- 17 November
Get Level of A Node 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 get the level of node in a binary tree in Java using recursive and iterative solutions. 2. Introduction to Problem Statement We will search for a node […]