Skip to content

Category Archives: Algorithms

Given a non-negative integer N, the task is to find the square root of N using bitwise operations. If the integer is not the perfect… Read More
Given two integers S and X representing the sum and bitwise XOR respectively of two integers, the task is to find the count of all… Read More
Given a number N and a mapping of letters to each integer from 1 to 8, which are: {1: ‘abc’, 2: ‘def’, 3: ‘ghi’, 4: ‘jkl’,… Read More
Given an array arr[] of size N, the task is to find the maximum value that can be obtained by following the below conditions: Select… Read More
Given an array A[], the task is to find the circulant matrix made by this array.  A circulant matrix is a square matrix of order… Read More
Given an array arr[] of size N and a positive integer K, the task is to check if the array can be reordered such that… Read More
Given a directed graph with N nodes and M edges in array V[], the task is to find the number of nodes that are accessible… Read More
Given two numbers N and K. The task is to check whether N is Kth power to any integer i.e., whether N can be expressed… Read More
Given an undirected tree with N nodes numbered from 1 to N and an array A[] where A[i] denotes the value assigned to (i+1)th node.… Read More
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