Given N distinct objects, the task is to find the number of distinct arrangements of N objects if all clockwise arrangements are considered the same.… Read More

# Category Archives: Mathematical

Given the integers N, K and M, the task is to find the Kth number greater than N whose sum of digits is divisible by… Read More

Given an array triangles[][] consisting of N triangles of the form {x1, y1, x2, y2, x3, y3} and an array cuts[] consisting of M horizontal… Read More

Given an array arr[], the task is to count the number of unordered pairs (arr[i], arr[j]) from the given array such that (arr[i] * arr[j])… Read More

Given an integer N, the task is to construct a binary matrix of size N * N such that the sum of each row and… Read More

Given two arrays A[] and B[] of size N and M respectively, the task is to find the sum of Bitwise AND of all possible… Read More

Given three positive integers L, R, and K, the task is to find the count of numbers in the range [L, R] having K consecutive… Read More

Given two sorted arrays, arr[], brr[] of size N, and M, the task is to merge the two given arrays such that they form a… Read More

Given an array arr[]of size N and an integer K, the task is to count the number of pairs from the given array such that… Read More

Given an array arr[] consisting of N positive integers, and an integer K, the task is to find the maximum possible even sum of any… Read More

Given an array arr[] consisting of N integers, the task is to count all disjoint pairs having absolute difference at least K. Note: The pair (arr[i],… Read More

Given three integers A, B, C denoting a triplet and three integers P, Q, R denoting another triplet. Repeatedly select any integer and add or… Read More

Given a string S of length N and an array Q[][] of queries in the form {l, r, y}. For each query, the task is… Read More