## Extended Midy’s theorem

According to Midy’s theorem, if the period of a repeating decimal for , where p is prime and is a reduced fraction, has an even… Read More »

## Minimum removals from array to make max – min <= K

Given N integers and K, find the minimum number of elements that should be removed such that Amax-Amin<=K. After removal of elements, Amax and Amin… Read More »

## Count n digit numbers divisible by given number

Given number of digit n and a number, the task is to count all the numbers which are divisible by that number and having n… Read More »

## Most frequent element in an array

Given an array, find the most frequent element in it. If there are multiple elements that appear maximum number of times, print any one of… Read More »

## Program to print Happy Holi

Festival of Holi is around the corner and to all the coding geeks around there, let it be more than just a holiday and learn… Read More »

## Calendar.equals() method in Java

java.util.Calendar.equals() is a method in Calendar class of java.util package. The method compares this Calendar to the specified Object.The method returns true if this object… Read More »

## Sum of the series 1.2.3 + 2.3.4 + … + n(n+1)(n+2)

Find the sum up to n terms of the series: 1.2.3 + 2.3.4 + … + n(n+1)(n+2). In this 1.2.3 represent the first term and… Read More »

## Sum of series with alternate signed squares of AP

We are given the Integer n and also in the next line 2*n integers which represent a Arithmetic Progression series a1, a2, a3…a2n they are… Read More »

## PHP | include_once() and require_once()

We already have learnt about file inclusion in PHP in the article PHP | (Include and Require). We have discussed about include() and require() functions… Read More »

## Freivald’s Algorithm to check if a matrix is product of two

Given three matrices A, B and C, find if C is a product of A and B. Examples: Input : A = 1 1 1… Read More »

## HCL Interview Experience | Set 2 (For Experienced)

Round 1: It was a written which consisted of 6 coding questions. It was set up just to see how well you can optimize code.… Read More »

## Smallest value in each level of Binary Tree

Given a binary tree containing n nodes, the task is to print minimum element in each level of binary tree. Examples: Input : 7 /… Read More »

## Find N Geometric Means between A and B

Given three integers A, B and N the task is to find N Geometric means between A and B. WE basically need to insert N… Read More »

## stream.limit() method in Java

Prerequisite : Streams in Java8 The limit(long N) is a method of java.util.stream.Stream object. This method takes one (long N) as an argument and returns… Read More »

## P – smooth numbers in given ranges

Given multiple ranges [L, R] and a prime number p, we need to find all P-smooth numbers in given individual ranges. What is P –… Read More »