Given a binary string str of length N, the task is to count the maximum number of adjacent pairs of form “01” or “10” that… Read More
Category Archives: Mathematical
Given a positive integer, N. Find the sum of the first N term of the series- 0.1, 0.11, 0.111, 0.1111, ….till N terms Examples: Input:… Read More
Given an integer N, the task is to find the Nth term of the series 3, 8, 15, 24, . . .till Nth term Examples:… Read More
Given a positive integer, N. Find the sum of the first N term of the series- 1, (1+4), (1+4+42), (1+4+42+43), …., till N terms Examples:… Read More
Given an integer N, the task is to find the Nth term of the series 3, 11, 31, 69, . . . . . till… Read More
Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More
Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More
Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More
Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More
Given a binary tree, the task is to find the length of the longest path which forms an Arithmetic progression. The path can start and… Read More
Given a square matrix M[][] of size N x N, the task is to find the maximums & minimums of each of the rows and… Read More
Given an array arr[] containing N non-negative integers, the task is to find the maximum AND value among all the subsets having length K. Examples: … Read More
Given an array arr[] of N integers, the task is to replace each element of Array with their rank according to Rightmost-Set Bit (RSB) in… Read More
Given an array arr[] of N non-negative integers and an integer P (1 ≤ P ≤ 30), which denotes the upper limit of any number… Read More
Given the series 2, 8, 18, 32, 50…, find the Nth term of the series. Examples: Input: N = 1Output: 2 Input: N = 3Output:… Read More