Given an array arr[] of size N (N > 3), the task is to find the position of the element that differs in parity (odd/even) with respect to all other array elements. Note: It is guaranteed that there will always be a number that differs in parity from all other elements....
Given an array arr[] of N integers, the task is to find the number of pairs of array elements (arr[i], arr[j]) such that the difference between the pairs is equal to the difference when the digits of both the numbers are reversed....
Given a binary string S of size N and three positive integers L, R, and K, the task is to find the minimum number of swaps required to such that the substring {S[L], .. S[R]} consists of exactly K 1s. If it is not possible to do so, then print “-1”....
Given string str representing a sentence, and an integer K, the task is to capitalize all the words in the given sentence having at least K characters....
Given two strings S1 and S2, representing sentences, the task is to print both sentences after removing all words which are present in both sentences....
Given two strings s1 and s2, the task is to check if characters of the first string can be mapped with the character of the second string such that if a character ch1 is mapped with some character ch2 then all the occurrences of ch1 will only be mapped with ch2 for both the strings....
Given a string s of length N, containing digits written in words but in jumbled form, the task is to find out the digits present in the string in word form and arrange them in sorted order....
Given a string str of size N consisting of lowercase English characters, the task is to find the minimum characters to be replaced to make all characters of string str same. Any character can be replaced by any other character....
Given a binary string S of size N, the task is to find the length of the longest non-increasing subsequence in the given string S....
Given two arrays A[] and B[] consisting of strings, the task is to print the strings from array A[] having all strings in B[] as a subsequence.Examples:...
Given an array of strings arr[], the task is to find the length of the longest common prefix by rearranging the characters of each string of the given array....
Given a string S, the task is to check if the string can be split into two substrings such that the number of vowels in both of them are equal. If found to be true, then print “Yes”. Otherwise, print “No”....