using System.Collections.Generic;
public Node build(int[] ar)
Dictionary<int, Node> mp = new Dictionary<int, Node>();
for(int i=0; i<ar.Length; i++)
for(int i=0;i<ar.Length;i++)
Console.Write(root.id+" ");
public static void Main()
int[] ar = new int[]{-1, 0, 0, 1, 1, 3, 5};
Program tree = new Program();
Node root = tree.build(ar);