Given an integer, P denoting the number of chocolates and an array a[] where ai denotes the type of ith chocolate. There are N people… Read More

# Category Archives: Hash

Given an array arr[] of distinct integers of size N, the task is to print the count of greater elements on the left side of… Read More

Given a boolean matrix mat[][] of size M * N, the task is to print the count of indices from the matrix whose corresponding row… Read More

Given a matrix m[][] of dimensions N × M and an integer K, calculate XOR(i, j) which is equal to the Bitwise Xor of all… Read More

Given two arrays X[] and Y[] consisting of N and M integers such that there are N lines parallel to the y-axis and M lines… Read More

Given an array arr[] consisting of N integers, the task is to print all adjacent integer pairs from the array which appears more than once… Read More

Given an array arr[] consisting of N integers, the task is to check if it is possible to split the integers into two equal length… Read More

Given two strings str1 and str2, the task is to count the minimum number of operations of the following three types on one of the… 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 arrays arr[] and brr[] consisting of N integers, the task is to count the number of pairs (i, j) from both the array… Read More

Given alphanumeric string str, the task is to rearrange the string such that no two adjacent characters are of the same type, i.e., no two… Read More

Given two strings str1 and str2, each of length N and consisting of lowercase English alphabets only, the task is to check if string str1… Read More