Company: visa_18oct
Difficulty: medium
Dynamic Array Queries Problem Description You are developing a new programming language. You believe that ordinary dictionaries are boring, so you've decided to add a cool feature to make your language unique! You want the cool feature to be able to perform two types of queries. With two integer arrays, a and b , the two types of queries are as follows: If the query is of the form [0, i, x] , then add x to a[i] . a[i] should be assigned the value of a[i] + x . If the query is of the form [1, x] , then find the total number of pairs of indices i and j such that a[i] + b[j] == x . You will be given the arrays of integers a and b , as well as queries : an array of queries in either of the forms described above. Your task is to implement this cool feature, perform the given queries and return an array of the results of the queries of the type [1, x] . vector solution(vector a, vector b, vector > queries) Examples Example 1: Input: a = [1, 4], b = [1, 2, 3], queries = [[1, 5], [0, 2, 1], [1