Skip to content

Category Archives: Competitive Programming

Given two integers A and B, the task is to print the integer among the two, which will be converted to an odd integer by… Read More
Given a string str, two characters X and Y. The task is to find the length of the longest substring that starts with X and… Read More
Given height H, and width W, of a rectangle, the task is to find the side of a square of the minimum area in which… Read More
Given a permutation arrays A[] consisting of N numbers in range [1, N], the task is to left rotate all the even numbers and right… Read More
Given four integers A, N, L and R, the task is to find the N th number in a sequence of consecutive integers from L… Read More
Given a binary tree consisting of N nodes, the task is to print the nodes that are just above the leaf node.Examples: Input: N =… Read More
Given a binary array arr[], the task is to find the longest subarray of non-empty cells after the removal of at most 1 empty cell. … Read More
Given two numbers N and K, the task is to find the minimum value X such that N < X*K. Examples:  Input: N = 8,… Read More
Given two positive integers S and X which represents the sum and Bitwise XOR of all the elements of an array arr[]. The task is… Read More
Given n rectangular buildings in a 2-dimensional city, computes the skyline of these buildings, eliminating hidden lines. The main task is to view buildings from… Read More
Given three integers R, C, N, and an array arr[] of size N. The task is to color all cells of a grid of R… Read More
Given two array of N integers arr[] and costArray[], representing removal cost associated with each element. The task is to find the subsequence from the… Read More
Given a string str, the task is to check if that string is a Reverse Bitonic string or not. If the string str is reverse… Read More