Find All Pairs in Array whose Sum is Equal to given number Using Java

Find All Pairs In Array Whose Sum Is Equal To Given Number in java

In this tutorial, we will learn to write Java Program to find all pairs of integers in an array whose sum is equal to a given number. There are multiple ways to solve this problem in Java and We will in this article. For Example Output It means the sum of (2,10) and (4,8) give … Read more

Python Program to find top two maximum number in array

find top two maximum number in array

In this tutorial, you will learn how to write Python program to find the first top two largest/maximum element in python. To find two maximum number in python, first we will sort our array in ascending order (you can also implement it by sorting in descending order). Now select last two distinct element which will … Read more

Python program to calculate the cube of a number

Calculate The Cube Of A Number in python

In this tutorial, we are going to learn a python program to calculate the cube of a given number. Problem Statement For any number that are inputs given by the user, we have to print x3, i.e. cube of that number.  For example: Our logic to calculate the cube of a given number Algorithm to … Read more

Python program to find smallest number among three

python program to Find Smallest Number Among Three

In this tutorial, we are going to learn a python program to find the smallest number among three numbers that are given by the user. Problem Statement For three numbers that are inputs given by the user, we have to print the smallest among those 3 numbers.  For example: Our Logic to find smallest number … Read more

Java Program to Calculate the Cube of a Number

cube program in java

In this tutorial we will learn writing java program to calculate the cube of a given number.  Our program will take a number and will return the cube of that number as output. What is Cube of Number? When a number is multiplied to itself three times, resultant number is known as cube of number. … Read more

Calculate power of given number in Java

power program in java

In this tutorial we will learn writing a program in java to calculate the power of a given number. To calculate the power, user will give the base number and the exponent number. Power is calculated by multiplying the base number exponent times. For Example: Suppose we have to calculate 5 to power 3. Here … Read more

C Program to find highest frequency element in array

C Program To Find Highest Frequency Element In Array

In this tutorial we will learn writing C Program to find highest frequency element in array. Our program will print the array element which have repeated most times. There is one edge case where two elements might repeat same time. This type of case we are not handling in our code. C Program to find … Read more