## Count of Array elements in given range with remainder X when divided by K for Q queries

Given an array arr of size N, an integer K and Q queries, each of form {x, l, r}. For each query, the task is to find the count of all elements in index range which have remainder x when divided by K.Examples:Input: arr = {15, 28, 72, 43,…