Posts by vikrant_tomar

Author Biographical Info: Not available

#### How to Count leaf nodes in a binary tree using Recursion in Java

By vikrant_tomar

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

#### Check whether a given tree is a Binary Search Tree in Java

By vikrant_tomar

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

#### Preorder, Inorder and Postorder traversals without Recursion in Java

By vikrant_tomar

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

#### Find all prime numbers less than or equal to N in Java

By vikrant_tomar

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

#### Reading and writing a file in Java using FileInputStream and FileOutputStream

By vikrant_tomar

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

#### Program to find all distinct solutions to N-Queens problem in Java

By vikrant_tomar

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

#### Implementation of Counting sort in Java.

By vikrant_tomar

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

#### Program to find all permutations of a string in Java

By vikrant_tomar

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