In this Java tutorial, we will learn how to solve lucky seven problem in Java. We will also take a look at the code snippet with the output. Problem Statement – Solve Lucky S.... Read More
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 are going to learn how to convert string to integer and integer to string using pre-defined functions in Java. So in the same tutorial post we will see ho.... Read More
In this Java tutorial, we are going to swap two strings using pre-defined substring() function in Java. What is substring() in Java? substring() method in Java operates in two ways.... Read More
Problem Statement We are provided with an integer N. We have to print the N*N pattern like consider the following 4×4 pattern: 1 2 4 7 3 5 8 11 6 9 12 14 10 13 15 16 Algorithm to .... Read More
In this Java tutorial, we are going to discuss the famous Tower of Hanoi problem using ‘n’ disks. We are going to solve it using recursive function calling approach. Wh.... Read More
In this Java tutorial, we will learn how to segregate R G B in a string in Java. You will find easy to understand algorithm with an easy code snippet. Input and output are also pro.... Read More
In this Java tutorial, we are going to learn how to find the smallest distance between a pair of points in presence of many other points. Problem statement: Find the closest distan.... Read More