Java Program to find Reverse of the string.8 Jan 2025 | 1 min read In this program, we need to find the reverse of the string. This can be done by iterating the string backward and storing each character from the original string into a new string. ALGORITHM
Program:Output: Original string: Dream big Reverse of given string: gib maerD Next TopicJava Programs |
In this program, we have to find out the number of nodes present in the circular linked list. We first create the circular linked list, then traverse through the list and increment variable 'count' by 1. Algorithm Define a Node class which represents a node in the...
5 min read
Java Program to divide a string in 'N' equal parts. Here, our task is to divide the string S into n equal parts. We will print an error message if the string cannot be divisible into n equal parts otherwise all the parts need to be...
3 min read
To solve this problem, we need to understand the concept of backtracking. According to the backtracking algorithm: Fix a character in the first position and swap the rest of the character with the first character. Like in ABC, in the first iteration three strings are formed: ABC,...
3 min read
In this program, our task is to count the total number of vowels and consonants present in the given string. As we know that, the characters a, e, i, o, u are known as vowels in the English alphabet. Any character other than that is known...
3 min read
In this program, we need to create a doubly linked list and rotate it by n node. This can be achieved by maintaining a pointer that starts from the head node and traverses the list until current points to the nth node. Move the list...
7 min read
Duck number is another special positive non-zero number that contains zero in it. The digit zero should not be presented at the starting of the number. Zero can be present at any of the positions except the beginning of the number. Let's understand some examples of Duck...
3 min read
Java Program Number to Word In this section, we will create a Java program that converts the given number into words. For example, if the given number is 54,297 then the output should be Fifty-Four Thousand Two Hundred Ninety-Seven. Let's create a Java program for the same. NumberToWordExample1.java class...
9 min read
In this section, we will learn what is an emirp number and also create Java programs to check if the given number is emirp or not. The emirp number Java program frequently asked in Java coding tests to check the logic of the programmer. Emirp Number A number...
2 min read
It is very interesting problem frequently asked in interviews of top IT companies like Google, Amazon, TCS, Accenture, etc. By solving the problem, one wants to check the logical ability, critical thinking, and problem-solving skill of the interviewee. So, in this section, we are going to...
2 min read
Java program to print the following pattern on the console In this program, we are creating a right-angled triangle of numbers in increasing order. We are creating two loops, and 2nd loop is executing according to the first loop, inside 2nd loop printing the number row-wise...
2 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India