Skip to content

Category Archives: Competitive Programming

Given an integer N. The following tasks are performed: The number is noted. The leading digit from N is subtracted from N and the resulting… Read More
Given two integers A and B, the task is to calculate 22A % B. Examples: Input: A = 3, B = 5 Output: 1 223… Read More
Given an array arr[] of size N and an integer K, the task is to find the smallest index in the array such that: floor(arr[i]… Read More
Given three integers X, N and M. The task is to find XXX…(N times) % M where X can be any digitfrom the range [1,… Read More
Given an integer Y, find the smallest number X such that X! contains at least Y trailing zeros. Prerequisites – Count trailing zeroes in factorial… Read More
Given a number N. Find the number of ways to divide a number into four parts(a, b, c, d) such that a = c and… Read More
Given a range of positive integers from l to r. Find such a pair of integers (x, y) that l <= x, y <= r,… Read More
Given 2 integers L and R, the task is to find out the number of integers in the range [L, R] such that they are… Read More
Given an array of size n, the task is to find the minimum number of steps required to make all the elements of the array… Read More
Given two N X M matrices of integers. In an operation, we can transpose any square sub-matrix in matrix1. The task is to check if… Read More
Given a generic digital clock, having h number of hours and m number of minutes, the task is to find how many times the clock… Read More
Given the position of the queen (qX, qY) and the opponent (oX, oY) on a chessboard. The task is to determine whether the queen can… Read More
Given two arrays of N integers. Consider an array C, where the i-th integer will be d*a[i] + b[i] where d is any arbitrary real… Read More
Given an array of N integers and an integer K. The task is to print the maximum number of pairs(a[i]+a[j]) possible which are divisible by… Read More
Given four integers a, b, c and d which signifies the number of four types of brackets. “((“ “()” “)(“ “))” The task is to… Read More