## Count common elements in two arrays containing multiples of N and M

Given two arrays such that the first array contains multiples of an integer n which are less than or equal to k and similarly, the… Read More »

## Nth number whose sum of digit is multiple of 10

Content Removed My Personal Notes arrow_drop_up Save

## Generate elements of the array following given conditions

Given an integer N, for every integer i in the range 2 to N, assign a positive integer such that the following conditions hold :… Read More »

## Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]

Given a sorted array of positive integers where arr[i] > 2*arr[i-1], check whether a sub sequence exists whose sum is equal to k. Examples: Input… Read More »

## Maximize the happiness of the groups on the Trip

A trip to mystical land is going to be organized in ByteLand, the city of Bytes. Unfortunately, there are limited seats say A and there… Read More »

## Check whether two strings contain same characters in same order

Given two strings s1 and s2, the task is to find whether the two string contain the same characters that occur in the same order.… Read More »

## Longest string in an array which matches with prefix of the given string

Given an array of strings arr[] and Q queries where each each query consists of a string str, the task is to find the longest… Read More »

## Find a way to fill matrix with 1’s and 0’s in blank positions

Given an N * M matrix mat[][] which consists of two types of characters ‘.’ and ‘_’. The task is to fill the matrix in… Read More »

## Find the sum of the ascii values of characters which are present at prime positions

Given a string str of size N, the task is to find the sum of all ASCII values of the characters which are present at… Read More »

## Count of all possible values of X such that A % X = B

Given two integers A and B. The task is to find the count of all possible values X such that A % X = B.… Read More »

## Maximum possible middle element of the array after deleting exactly k elements

Given an integer array of size n and a number k. If the indexing is 1 based then the middle element of the array is… Read More »

## Find the sum of numbers from 1 to n excluding those which are powers of K

Given two integer N and K, the task is to find the sum of all the numbers from the range [1, N] excluding those which… Read More »

## Find the time which is palindromic and comes after the given time

Given a string str which stores the time in the 24 hours format as HH:MM such that 0 ≤ HH ≤ 23 and 0 ≤… Read More »

## Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

## Check whether a number can be represented as sum of K distinct positive integers

Given two integers N and K, the task is to check whether N can be represented as sum of K distinct positive integers. Examples: Input:… Read More »