We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The values of x and y are the items at queries[i][1] and queries[i][2].
let x = queries[i][1];
let y = queries[i][2];
I had to read the instruction 10 times to understand. What it means by (1 or 2) x y is that in the Ith index of queries, the first value will be 1 or 2, the second value will be what x's value will be and the third will be y's value.
Hope this hlps.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Dynamic Array
You are viewing a single comment's thread. Return to all comments →
The values of x and y are the items at queries[i][1] and queries[i][2].
let x = queries[i][1]; let y = queries[i][2];
I had to read the instruction 10 times to understand. What it means by (1 or 2) x y is that in the Ith index of queries, the first value will be 1 or 2, the second value will be what x's value will be and the third will be y's value.
Hope this hlps.