deque Question 6

Last Updated :
Discuss
Comments

Match the deque operation with time complexity:

I. Insert at Beginning i) O(n)

II. Delete from Middle ii) O(1)

III. Find iii) O(n)

IV. Random Index Access iv) O(1)

I-ii, II-i, III-iv, IV-iii

I-ii, II-iii, III-i, IV-iv

I-i, II-iii, III-n, IV-ii

I-i, II-i, III-i, IV-i

Share your thoughts in the comments