# Category Archives: Algorithms

Given a circular array arr[] of size N, the task is to find the next integers of same parity for every element in arr[]. If… Read More
Given three integers N, R, and C representing an N*N chessboard and the position (R, C) where the rook and the bishop is placed. The… Read More
Given two integers P and N denoting the frequency of positive and negative values, the task is to check if you can construct an array… Read More
Given a string S of length N, the task is to find the number of unique subsequences of the string for each length from 0… Read More
Data structure and algorithms are an integral part of computer science. All the enthusiasts, at some point in time, learn these two important topics. They… Read More
Find the largest positive integer that can be formed by deleting only one occurrence of a given digit. Examples: Input: num = 56321, digit =… Read More
Given an integer N, the task is to find the minimum number of divisions required to reduce the number to 1 when the divisions follow… Read More
Given integer N and K, denoting the number of teams participating in a football tournament where each team plays only one match with each other… Read More
Given an array arr[] containing N email addresses with different domains, the task is to find the unique domains and their frequencies from the list… Read More
Given two arrays A[] and B[] (B[i] < A[i]) of size N each and an integer K, the task is to perform the operation of… Read More
Given two integers N and M, the task is to generate any N * M sized maze containing only 0 (representing a wall) and 1… Read More
Given an array arr[] of N strings, and Q queries where each of the queries contains some characters, the task is to check, for each… Read More
Given a binary array arr[] of size N which is starting from index 0, the task is to reach the end of the array in… Read More
Construct a string that contains a times letter ‘A’ and b times letter ‘B’ (a > b) such that the maximum continuous occurrence of a… Read More
For a given matrix before[][], the corresponding cell (x, y) of the after[][] matrix is calculated as follows:  res = 0;for(i = 0; i <=… Read More