Given an array arr[] consisting of N positive integers, the task is to find an index from the array having count of prime numbers present… Read More

# Category Archives: Hash

Given a string S consisting of N characters (representing the tasks to perform) and a positive integer K, the task is to find the minimum… Read More

Given string S consisting of lowercase and uppercase letters, the task is to find the number of substrings having the equal number of lowercase and… Read More

Given an array arr[] consisting of N integers, the task is to count the number of distinct pairs (arr[i], arr[j]) in the array such that… Read More

Given a string S consisting of N characters (representing the tasks to perform) and a positive integer K, the task is to find the minimum… Read More

Given a string S of length N, the task is to find the SHA-512 Hash Value of the given string S. Examples: Input: S =… Read More

Given a string S of size N, consisting of digits [0 – 9] and character ‘.’, the task is to print the string that can… Read More

Given an array arr[] consisting of N integers, the task is to find the number of pairs such that the GCD of any pair of… Read More

Given two graphs G1 and G2, the task is to find the union and intersection of the two given graphs, i.e. (G1 ∪ G2) and… Read More

Given an array arr[] consisting of N integers, the task is to print the smaller of the two subsets obtained by splitting the array into… Read More

Given a string S consisting of N lowercase alphabets, the task is to count the number of substrings whose frequency of each character is even.… Read More

Given an array, arr[] consisting of N integers, the task for each array element arr[i] is to print the sum of |i – j| for… Read More

Given two positive integers A, B, and an array D[] consisting only of digits [0-9], the task is to check if it is possible to… Read More

Given a string S consisting of N characters and a positive integer K, the task is to count the number of substrings having at least… Read More

Given an array arr[] consisting of N strings, the task is to find the pair of strings that is not present in the array formed… Read More