• + 0 comments

    This is O(n) where n is the length of the queries array. It is independent of the length of the input array, since it grabs the input array elements by index and only has to loop through the queries to grab each one.