Numbers within a range that can be expressed as power of two numbers
Given two integers L and R. Find the number of perfect powers in the given range [L, R]. A number x is said to be… Read More »
Given two integers L and R. Find the number of perfect powers in the given range [L, R]. A number x is said to be… Read More »
Given a string s and a character c, find if all occurrences of c appear together in s or not. If the character c does… Read More »
Given a string, find the longest substring which is palindrome. For example, if the given string is “forgeeksskeegfor”, the output should be “geeksskeeg”. Prerequisite :… Read More »
Given an increasing sequence a[], we need to find the K-th missing contiguous element in the increasing sequence which is not present in the sequence.… Read More »
Given a string s of length n, count the number of substrings having different types of palindromic characteristics. Palindromic Characteristic is the number of k-palindromes… Read More »
Given an element x, task is to find the value of its immediate smaller element. Example : Input : x = 30 (for above tree)… Read More »
Given an array of numbers of size N and Q queries. Each query or a range can be represented by L (LeftIndex) and R(RightIndex). Find… Read More »
Given two sorted arrays, a[] and b[], task is to find the median of these sorted arrays, in O(log(min(n, m)), when n is the number… Read More »
Given an array of N elements and Q queries of the form L R X. For each query, you have to output if the element… Read More »
An array is given of n length, and we need to calculate the next greater element for each element in given array. If next greater… Read More »
Given a number n, check it is the Stella Octangula number or not. A number of the form where n is a whole number(0, 1,… Read More »
Given a singly linked list and a key, find key using binary search approach. To perform Binary search based on Divide and Conquer Algorithm, determination… Read More »
Find the first non-repeating element in a given array of integers. Examples: Input : -1 2 -1 3 2 Output : 3 Explanation : The… Read More »
Given an unsorted array of integers and an element x, find if x is present in array using Front and Back search. Examples : Input… Read More »
We are given an array arr[] of size n. Numbers are from 1 to (n-1) in random order. The array has only one repetitive element.… Read More »