Posts from Java

Java Program to remove odd frequency characters in a string

By Mohit Goswami

In this tutorial, we are going to remove the characters from a string that appears an odd number of times in it. We are going to use HashMap in JAVA to improve our time complexity .... Read More

How to Sort a nearly sorted (or K sorted) array in Java

By Mohit Goswami

In this tutorial, we will write the code for this most frequently asked interview question “Sort a nearly k-sorted array” in Java. Using Min Heap in Java We are going t.... Read More

Java program to Determine if Two Trees are Identical

By Adit Gupta

In this tutorial, I will be showing how to check if two trees are identical or not in Java. I will be using Java language to implement my approach. Let us get started. Check if two.... Read More

java.util.Currency methods with example

By Adit Gupta

Currency is a pre-defined class present in the util package of Java. ISO 4217 is an internationally accepted standard. It recognizes currency and its code from all over the world. .... Read More

Java program to find a pair with the greatest product in an array

By Nishtha Grover

In this tutorial, we will write a Java program to find a pair with the greatest product in an array using a Brute Force as well as a Time-Efficient Approach. Brute Force Approach F.... Read More

Find median of an array using Quick Select Algorithm in Java

By Deepak Reddy

In this module, we are going to discuss find the median of an array using the quick-select algorithm in Java. The main aim of the quick-select algorithm is to find the kth smallest.... Read More

Logging in Java

By Abhay Shah

In the following tutorial, we will learn about logging in Java. Application activity is stored in log files and we can obtain those log files using Java. Logging means keeping a re.... Read More

Solve Coin Change problem in Java

By Mohit Goswami

In this tutorial, we are looking forward to solving one of the most frequently asked interview problems ” The coin change” using dynamic programming. Solving the coin c.... Read More