## Check a large number is divisible by 16 or not

Given a number, the task is to check if a number is divisible by 16 or not. The input number may be large and it… Read More »

## Reverse an array without using subtract sign ‘-‘ anywhere in the code

Given an array, the task is to reverse the array without using subtract sign ‘-‘ anywhere in your code. It is not tough to reverse… Read More »

## Find Index of given fibonacci number in constant time

We are given a Fibonacci number. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …..… Read More »

## Print prime numbers in a given range using C++ STL

Generate all prime numbers between two given numbers. The task is to print prime numbers in that range. The Sieve of Eratosthenes is one of… Read More »

Given an array of numbers where each element represents the max number of jumps that can be made forward from that element. For each array… Read More »

## Sort an array after applying the given equation

We have an integer array that is sorted in ascending order. We also have 3 integers A, B and C. We need to apply A*x*x… Read More »

## TimSort

TimSort is a sorting algorithm based on Insertion Sort and Merge Sort. A stable sorting algorithm works in O(n Log n) time Used in Java’s… Read More »

## Minimum number of deletions to make a sorted sequence

Given an array of n integers. The task is to remove or delete minimum number of elements from the array so that when the remaining… Read More »

## Check if it is possible to sort an array with conditional swapping of adjacent allowed

We are given an unsorted array of integers in the range from 0 to n-1. We are allowed to swap adjacent elements in array many… Read More »

## Minimum steps to delete a string after repeated deletion of palindrome substrings

Given a string containing characters as integers only. We need to delete all character of this string in a minimum number of steps where in… Read More »

## Collect all coins in minimum number of steps

Given many stacks of coins which are arranged adjacently. We need to collect all these coins in the minimum number of steps where in one… Read More »

## Date after adding given number of days to the given date

Given a date and a positive integer x. The task is to find date after adding n days to the given date Examples: Input :… Read More »

## Determine whether a given number is a Hyperperfect Number

Given a number, determine whether it is a valid Hyperperfect Number. A number n is called k-hyperperfect if: n = 1 + k ∑idi where… Read More »

## Sort an array of strings according to string lengths

We are given an array of strings, we need to sort the array in increasing order of string lengths. Examples: Input : {“GeeksforGeeeks”, “I”, “from”,… Read More »

## Using Chinese Remainder Theorem to Combine Modular equations

Given N modular equations: A ≅ x1mod(m1) . . A ≅ xnmod(mn) Find x in the equation A ≅ xmod(m1*m2*m3..*mn) where mi is prime, or… Read More »