Posts by Adit Gupta

Author Biographical Info: Not available

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

How to calculate electricity bill using a C++ program

By Adit Gupta

In this tutorial, we will be learning to calculate the electricity bill. I will be doing this with the help of total number of units consumed. It is straightforward, and all you ne.... Read More

How to set bits in all numbers from 1 to n in C ++

By Adit Gupta

In this tutorial, I will be showing to set bits of all numbers from 1 to n. I will be using C++ to implement my approach. Setting bits of a number basically means to change the bit.... Read More

Check if binary representation of a number is palindrome in Java

By Adit Gupta

In this tutorial, I will be explaining if the binary of a number is palindrome or not in Java. A palindrome number is one which when reversed, yields the same number with which we .... Read More

Turning off a particular bit in a number in Java

By Adit Gupta

In this tutorial, we will learn to turn off a bit of a number. We can use bitwise operators to carry out turning off a bit. However, if you wish to skip these operators you can man.... Read More

Unbounded fractional knapsack problem in Java

By Adit Gupta

In this tutorial, I will show how to solve the problem of unbounded fractional knapsack problem in Java language. It is somewhat different from the conventional knapsack problem. T.... Read More