Lists STL Quiz Q5 Doubt

What will be the complexity of splice?

@rahul.maheshmaheshwari its o(N) if used to transfer a range of elements
(just for info you can refer this https://www.geeksforgeeks.org/list-splice-function-in-c-stl/)
dont forget to hit like and mark resolved if cleared. :smiley:

Then why is the answer option B and not option D. As we are splicing list 2 and appending all elements of it in list 1, it should take O(N) where N is the number of elements in list 2.

@rahul.maheshmaheshwari wait some time i will tell you.

sure, i will wait. Thanks for the prompt reply.

@rahul.maheshmaheshwari i have messaged sir when he replies i will tell you

okay thanks a lot for the reply.

@rahul.maheshmaheshwari yes correct is D only sir has updated the answer
dont forget to mark this doubt resolved :smiley:

1 Like

thanks for clearing my doubt. I will mark it as resolved.