Given an array of size n+1 such that arr[i] = i. Given Q queries (Q<n) with condition:
Follow up: Consider the case where n is very large