Time complexity of this question

What is the Time complexity of this question?
Is it O(N ^ 2) where N = no of elements in inorder array = no of elements in preorder order

Hey @Sachita3
Yes its O(n^2)

If this resolves your query then please mark it as resolved :slight_smile: