Queries to check if any non-repeating element exists within range [L, R] of an Array
Given an array arr[] consisting of integers and queries Q of the form (L, R), the task is to check whether any non-repeating element is… Read More »
Given an array arr[] consisting of integers and queries Q of the form (L, R), the task is to check whether any non-repeating element is… Read More »
Pre-requisite: Lagrange’s Four-Square Theorem, Legendre’s Three-Square Theorem A number can always be represented as a sum of squares of other numbers. Note that 1 is… Read More »
Given an array arr[] of integers, the task is to find the total count of subarrays such that the sum of elements at even position… Read More »
Given an array arr[] consisting of N integers, the task is to find the second largest element in the given array using N+log2(N) – 2… Read More »
Given an un-directed and unweighted connected graph, find a simple cycle in that graph (if it exists). Simple Cycle: A simple cycle is a cycle… Read More »
Given an array arr[], the task is to find the minimum cost to remove all elements from the array where cost of removing an element… Read More »
What is String-Hashing? String hashing is the way to convert a string into an integer known as a hash of that string.An ideal hashing is… Read More »
Pre-requisite: Fractional Knapsack Problem Given two arrays weight[] and profit[] the weights and profit of N items, we need to put these items in a… Read More »
Given a binary string S, the task is to find the minimum number of Powers of 2 required to express a S.Examples: Input: S =… Read More »
Problem Description The problem solvers have found a new Island for coding and named it as Philaland. These smart people were given a task to… Read More »
Problem Description On a busy road, multiple cars are passing by. A simulation is run to see what happens if brakes fail for all cars… Read More »
Given two integer P and Q, the task is to find the value of P and modular inverse of Q modulo 998244353. That is Note:… Read More »
Given an integer X, the task is to find two integers A and B such that sum of these two numbers is X and the… Read More »
Given an array arr[] consisting of integers in the range [1, N], the task is to determine whether the Inverse Permutation of the given array… Read More »
Testing Coding problems can sometimes become hectic. Here are some tips to use while testing Algorithmic Programming Problems. There are generally four major categories of… Read More »