## 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 »

- Count common characters in two strings
- Sort an array without changing position of negative numbers
- Nth number whose sum of digit is multiple of 10
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Find minimum difference between any two elements | Set 2
- Interactive Problems in Competitive Programming
- Check whether two strings contain same characters in same order
- Program to find the kth character after decrypting a string
- Total number of possible Binary Search Trees using Catalan Number
- Find the minimum number of operations required to make all array elements equal
- Check if a Queen can attack a given cell on chessboard
- Maximize the happiness of the groups on the Trip
- Find the minimum number of elements that should be removed to make an array good
- Find the number of pair of Ideal nodes in a given tree
- Find sub-arrays from given two arrays such that they have equal sum
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Maximum subarray sum by flipping signs of at most K array elements
- Count of all possible values of X such that A % X = B
- Count how many times the given digital clock shows identical digits
- Lazy Propagation in Segment Tree | Set 2
- Equal Sum and XOR of three Numbers
- Number of ways of scoring R runs in B balls with at most W wickets
- Find the Nth Mosaic number
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Convert the undirected graph into directed graph such that there is no path of length greater than 1
- Replace array elements by sum of next two consecutive elements
- Sum of bitwise AND of all submatrices
- Find the shortest distance between any pair of two different good nodes
- Generate elements of the array following given conditions

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 »

Content Removed My Personal Notes arrow_drop_up Save

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 »

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 »

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 »

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 »

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 »

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

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 »

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 »

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 »

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 »

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 »

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

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 »