247 views
0 votes
0 votes

What is the time complexity to construct a binary tree when inorder and preorder traversal of the tree is given?

1. O(n)

2.O(n log n)

3. O(n2)

4.O(n2 log n)

1 Answer

0 votes
0 votes
O(N)

Related questions

3 votes
3 votes
1 answer
1
2 votes
2 votes
0 answers
2
kallu singh asked Dec 16, 2017
337 views
1 votes
1 votes
1 answer
3
kallu singh asked Aug 19, 2017
1,000 views
Q. The best case of quick sort helps Aditya to sort a particular data set of size ‘n’ in 640 ms. Suresh also tried the same algorithm on similar data set and it took...