Skip to content

Category Archives: Algorithms

Given an integer N, the task is to construct an array of N distinct elements (arr[i] ≤ N+1) such that the bitwise XOR of every… Read More
Google Code Jam is an international programming competition hosted and controlled by Google. The competition began in 2003. From 2003 to 2007, Google Code Jam… Read More
A bike race is being organised with N bikers. The initial speed and the acceleration of the bikers are given in arrays H[] and A[]… Read More
Given an integer K and an array arr[] of N integers, the task is to find the maximum number that can be added or subtracted… Read More
Given an array A[] having N positive integers, the task is to find the minimum number of steps to build this array from an initial… Read More
Representation Change is one of the variants of the Transfer and Conquer technique where the given problem is transformed into another domain that is more… Read More
Today’s world is highly reliable on data and their appropriate management through widely used apps and software. The backbone for appropriate management of data is… Read More
Given a string S on which you need to perform Q replace operations.Each replacement operation has 3 parameters: a starting index i, a source word… Read More
Consider the set of irreducible fractions A = {n/d | n≤d and d ≤ 10000 and gcd(n, d) = 1}. You are given a member… Read More
Given 2d integer array arr[][] containing N coordinates each of type {X, Y}, the task is to find the minimum number of straight lines required… Read More
Given a string str consisting of N letters, the task is to find the total number of strings that can be generated by replacing each… Read More
Given an array arr[], consisting of N integers, the task is to find the minimum number of moves required to make all numbers in the… Read More
Content Removed Recommended Solve DSA problems on GfG Practice. Solve Problems My Personal Notes arrow_drop_up Save
There are many ways for checking whether the array contains any specific value or not, one of them is: Examples: Input: arr[] = {10, 30,… Read More
Given an array A[] of length N, the task is to count the number of subarrays of A[] that contain the length of that subarray.… Read More

Start Your Coding Journey Now!