Given two strings S1 and S2, the task is to check if string S1 can be made equal to string S2 by swapping any pair… Read More

# Tag Archives: frequency-counting

Given a binary string S of length N, the task is to find the minimum number of 0s required to be removed from the given… Read More

Given a string, S, the task is to find the maximum number of distinct indexed palindromic subsequences of length 3 possible from the given string.… Read More

Given two binary arrays L1[] and L2[], each of size N, the task is to minimize the count of remaining array elements after performing the… Read More

Given an array arr[] of size N, the task is to find the minimum increments by 1 required to be performed on the array elements… Read More

Given two positive integers X and Y, the task is to count pairs with even sum possible by choosing any integer from the range 1… Read More

Given an array arr[] of size N, the task is to count the number of distinct subsequences consisting of a single distinct element that can… Read More

Given an array arr[], the task is to append the given array exactly K – 1 times to its end and print the total number… Read More

Given two binary strings S1 and S2 of length N (1 ≤ N ≤ 105), the task is to check if it is possible to… Read More

Given an array arr[] consisting of N integers in the range [0, M] and an integer M, the task is to count the number of… Read More

Given two strings str1 and str2, the task is to find the minimum number of operations required to map each character of the string str1… Read More

Given an array arr[] of size N (1 ≤ N ≤ 105), the task is to find the number of ways to select a triplet… Read More

Given a string S consisting of ‘(‘ and ‘)’, the task is to find the minimum count of bracket reversals required to make the string… Read More

Given a string str, the task is to find the maximum count of pairs (str[i], str[j]) of balanced parenthesis required to be removed such that… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to find the maximum number of unique elements possible by… Read More