For this Question: Given N, the number of nodes in a Graph and bidirectional edges of the graph. The task is to do Breadth First Search of this Graph starting from node 0.
Note: Traverse the neighbouring nodes of each node in the order they appear in the input. Make adjacency list in the order the edges appear.The first line of input contains an integer N and next line contains N-1 pairs of numbers (pairs as X Y) are given in the next line which represents a bidirectional edge from X to Y.

Constraints:
1 <= N <= 1000
0 <= X, Y <= N-1Print the BFS of the Graph starting from 0.Example 1:
5
0 1
0 2
0 3
2 4

Output:
0 1 2 3 4

Example 2:
Input:
7
0 2
0 1
2 6
2 5
1 3 
1 4

Output:
0 2 1 6 5 3 4

Explanation:
For Example 1, First line of each test case represent an integer N denoting number of nodes and edges and then in the next line N-1 pairs of values a and b are fed which denotes there is a bidirectional edge from a to b ., I have written this Solution Code: #include<bits/stdc++.h>
#define pu push_back
using namespace std;
#define sz 1000000
int vis[sz];
vector<int> NEB[sz];
int L[sz];
int val[sz];
signed main()
{   

     
    int n;
    cin>>n;
    for(int i=0;i<n-1;i++)
    {
        int a,b;
        cin>>a>>b;
        NEB[a].pu(b);
        NEB[b].pu(a);
    }
    deque<int> ss;
    ss.pu(0);
    while(!ss.empty())
    {
        int yy=ss.front();
        ss.pop_front();
        //cout<<yy<<endl;
        if(vis[yy]==1) continue;
        vis[yy]=1;
        cout<<yy<<" ";
        L[val[yy]]++;
        for(int i=0;i<NEB[yy].size();i++)
        {
            int l=NEB[yy][i];
           // cout<<l<<endl;
            if(vis[l]==0)
            {//cout<<"hh";
                ss.pu(l);
                val[l]=val[yy]+1;
            }
        }
    }
    
    }, In this Programming Language: C++, Now tell me if this Code is compilable or not?