Algorithm
- 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 […]
- 08 August
Fibonacci series program in java
If you want to practice data structure and algorithm programs, you can go through 100+ java coding interview questions. Fibonacci series is numerical series in which next number is sum of previous two numbers. For example : 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 etc. There are two ways to print Fibonacci […]
- 05 June
Introduction to complexity of algorithm
“How will you calculate complexity of algorithm” is very common question in interview.How will you compare two algorithm? How running time get affected when input size is quite large? So these are some question which is frequently asked in interview.In this post,We will have basic introduction on complexity of algorithm and also to big o […]
- 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 […]