Tag: java coding solutions
-
How to find and replace a given string with new string in a file
This is the first solution to find and replace a given string with a new string in a file. This approach uses the FileReader, BufferedReader, FileWriter, BufferedWriter, and StringBuffer methods.
-
How to reverse all the numbers in an array of integers
This is the first solution to reverse all the numbers. This solution modifies the same array. The resultant array has all the numbers reversed.
-
How to count number of occurrences of a given word in a file
This is the first solution to count the number of occurrences of a given word in the file. This approach uses the FileReader, BufferedReader, and string buffer methods.
-
How to check a string can be eligible to form a palindrome
This is the third solution to check whether a string can be formed as a palindrome. This approach uses the eliminating the repeated characters from the input string using the String Buffer class.
-
How to check a string can be eligible to form a palindrome
This is the second solution to check whether a string can be formed as a palindrome. This approach uses the eliminating the repeated characters from the input string using the Hash map collection.
-
How to check a string can be eligible to form a palindrome
This is the first solution to check whether a string can be formed as a palindrome. This approach uses the core logic to check the criteria for the palindrome.
-
How to find nTh number of Fibonacci series
This is the second solution to find the nTh number of the Fibonacci series using recursion approach.
-
How to find nTh number of Fibonacci series
This is the first solution to find the nTh number of the Fibonacci series.
-
How to print Floyd’s Triangle
This is the first solution to print the Floyd’s Triangle. The program expects the number of rows as input from the user. The logic displays that many number of rows as per the Floyd’s Triangle pattern of numbers in each row.
-
How to find factorial of an integer value
This is the third solution to find the factorial of long integer value. This solution uses the recursion approach. The recursive function should have an exit condition to stop function calling itself infinite number of times.
