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: #include "bits/stdc++.h"
#pragma GCC optimize "03"
using namespace std;
 
#define int long long int
#define ld long double
#define pi pair<int, int>
#define pb push_back
#define fi first
#define se second
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif
 
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int l[N], r[N], c = 0;

void dfs(int u){
	if(l[u] != -1)
		dfs(l[u]);
	cout << u << " ";
	if(r[u] != -1)
		dfs(r[u]);
	c++;
}

signed main() {
	IOS;
	int n;	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> l[i] >> r[i];
	}	
	dfs(1);
	assert(c == n);
	return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?