For this Question: Given a binary tree, with root 1, print the inorder traversal of the tree.
Algorithm Inorder(tree)
   1. Traverse the left subtree
   2. Visit the root.
   3. Traverse the right subtreeThe input consists of N+1 lines. 
First line contains the integer N, denoting the number of nodes in the binary tree.
Next N lines contains two integers denoting the left and right child of the i'th node respectively. 
If the node doesn't have a left or right child, it is denoted by '-1'

1 <= N <= 100000Print a single line containing N space separated integers representing the inorder traversal of the given treeSample Input 1:
5
2 4
5 3
-1 -1
-1 -1
-1 -1
Sample output 1:
5 2 3 1 4 

Explanation: Given binary tree 
                1
               /  \
             2     4
            / \
          5    3

, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException {


		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		Node root=new Node(1);
		Node temp=root;
		HashMap<Integer,Node> map=new HashMap<>();
		map.put(1,temp);

		int l,r;
		for(int i=0;i<n;i++){
			String[] arr=br.readLine().trim().split(" ");
			l=Integer.parseInt(arr[0]);
			r=Integer.parseInt(arr[1]);

			temp=map.get(i+1);

			if(l!=-1){
				temp.left=new Node(l);
				map.put(l,temp.left);
			}
			if(r!=-1){
				temp.right=new Node(r);
				map.put(r,temp.right);
			}

		}
		inorder(root);
		System.out.println(s);
	}
	static StringBuilder s = new StringBuilder("");
	public static void inorder(Node root){
		if(root==null){
			return;
		}
		inorder(root.left);
		s.append(root.data);
		s.append(" ");
		inorder(root.right);
	}
}
class Node{
	int data;
	Node left,right;
	Node(int data){
		this.data=data;
		this.left=null;
		this.right=null;
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?