Given an array of strings arr[][] of size N and a string S, the task is to find the number of strings from the array… Read More

# Tag Archives: cpp-unordered_set

Given a string str of length N and an integer K, the task is to check if a string has two non-overlapping substrings of length… Read More

Given an array of strings arr[] of size N, the task is to print all the distinct strings present in the given array. Examples: Input:… Read More

Given a string str, consisting of lowercase alphabets, the task is to find the shortest string which is not a subsequence of the given string.… Read More

Given a matrix mat[][] of size M * N, the task is to find all matrix elements which are minimum in their respective row and… Read More

Given two strings start and target(both of the same length) and a list of strings str[], the task is to print all possible smallest sequences… Read More

Given a Binary Tree and an integer K, the task is to check if the Tree consists of a pair of leaf nodes with sum… Read More

Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string. Examples: Input: str… Read More

Given an initial array, A[] and a final array B[] both of size N containing integers from the range [1, N], where A[] represent the… Read More

Given two arrays a[] and b[], the task is to find the count of all pairs (a[i], b[j]) such that a[i] + b[j] is unique… Read More

Given a number N. Add one to the number in the first step and if the number has trailing zeros, remove all the trailing zeros… Read More

Given two arrays arr1[] and arr2[] of sizes N and M where 0 ≤ arr1[i], arr2[i] ≤ 1000 for all valid i, the task is… Read More

Given an unsorted sequence a[], the task is to find the K-th missing contiguous element in the increasing sequence of the array elements i.e. consider… Read More

Given N strings of equal lengths. The strings contain only digits (1 to 9). The task is to count the number of strings that have… Read More

Given an array arr[] of N elements and an integer K, the task is to find the number of ways of choosing an integer X… Read More