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.
first line cosist number of array and queries p=2 and q=2 \n
p number of arrays, line: 3 1 5 4,
first element represents number of elements in an array = 3, array: 1 5 4, same for "5 1 2 8 9 3" .
q number of queries line: 0 1 , 0 indexed array ("1 5 4"), 1 indexed element("5") answer : 5,
same goes for "1 3" answer: 9
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →
first line cosist number of array and queries p=2 and q=2 \n p number of arrays, line: 3 1 5 4, first element represents number of elements in an array = 3, array: 1 5 4, same for "5 1 2 8 9 3" . q number of queries line: 0 1 , 0 indexed array ("1 5 4"), 1 indexed element("5") answer : 5, same goes for "1 3" answer: 9