Problem of the day
Given an array 'arr' that contains 7 integers representing the values of nodes in a binary tree. This represents level order. The first element of the array represents the value of the root node.
Your objective is to construct a binary tree using the remaining 6 elements of the array, creating nodes for each of these values and return root node.
arr = [11, 22, 3, 54, 15, 23, 21]
The 7 node binary tree is represented below.

The first line of contains 7 integers of array ‘arr’.
Output Format:
The output contains the root element of the constructed tree. If the constructed tree is not formed correctly then output will be ‘-1’.
Note:-
You don’t need to print anything. Just implement the given function.
1 2 3 4 5 6 7
1
The 7 node binary tree is represented below.

11 22 3 54 15 23 21
11
arr.length = 7
1<=arr[i]<=100
Time Limit: 1 sec