Posts by vikrant_tomar
Author Biographical Info: Not available
In this post, we will write a Java program to count the leaf nodes in a binary tree. We will use recursion to solve this problem. In a binary tree, each node can have at most two.... Read More
In this Java tutorial, we will solve a well-known problem of Tree data structure. Given a tree, we will check whether the given tree is a Binary search tree or not. Binary Search T.... Read More
In this Java tutorial, we will learn how to traverse a tree without recursion in Java. We will implement preorder, inorder and postorder traversals without recursion in Java. Preor.... Read More
In this Java tutorial, we will write a program to find all prime numbers less than or equal to N. We will use the concept of Sieve of Eratosthenes. Sieve of Eratosthenes It is an a.... Read More
In this Java tutorial, we will learn about file handling in Java. Basically, we will learn reading and writing a file in Java using FileInputStream and FileOutputStream. The java..... Read More
In this Java tutorial, we will find all solutions to N-Queens problem in java. We will use backtracking to find all unique solutions to the problem. Problem Statement An N*N chessb.... Read More
In this Java tutorial, we will learn about counting sort. And, we will also learn the implementation of counting sort in java. We have several algorithms that can sort n numbers in.... Read More
In this Java tutorial, we will learn how to find all permutations of a string in Java. We will solve the problem using recursion. Recursion is a process where a function calls itse.... Read More