For this Question: Find the level in a binary tree which has the maximum number of nodes. The root is at level 0.

If multiple levels have the highest amount of nodes, print the lowest level.The first line contains the integer N, denoting the number of nodes in the binary tree.
Next N lines contain 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'

Constraints
1 <= N <= 100000Print the level number with maximum nodes.
If multiple levels have the highest amount of nodes, print the lowest level.Sample Input:
7
2 4
5 3
-1 -1
-1 7
6 -1
-1 -1
-1 -1

Sample output:
2

Explanation: Given binary tree 
                1
               /  \
             2     4
            / \      \
          5    3     7    <-- Level 2
         /
       6 
Level 0 has 1 node
Level 1 has 2 nodes
Level 2 has 3 nodes
Level 3 has 1 node, I have written this Solution Code: #include "bits/stdc++.h"
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 = 1e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int l[N], r[N], p[N];

void dfs(int u, int dep){
	p[dep]++;
	if(l[u] != -1)
		dfs(l[u], dep+1);
	if(r[u] != -1)
		dfs(r[u], dep+1);
}

void solve(){
	int n;
	cin >> n;
	for(int i = 1; i <= n; i++)
		cin >> l[i] >> r[i];
	dfs(1, 0);
	int mx = 0, id = -1;
	for(int i = 0; i <= n; i++){
		if(p[i] > mx){
			mx = p[i];
			id = i;
		}
	}
	cout << id;
}

void testcases(){
	int tt = 1; 
	//cin >> tt;
	while(tt--){
		solve();
	}
}

signed main() {
	IOS;
		clock_t start = clock();

	testcases();

	cerr << (double)(clock() - start)*1000/CLOCKS_PER_SEC << " ms" << endl;
	return 0;
}	, In this Programming Language: C++, Now tell me if this Code is compilable or not?