int bfs( Long rootId ) {

        int numOfNodes = 0;

        Queue<Long> q = new LinkedList<Long>();

        q.add(rootId);

        while( !q.isEmpty() ) {
            numOfNodes ++;

            Long id = q.poll();

            if( adjacencyList.containsKey(id)) {
                for (Long childId : adjacencyList.get(id)) {
                    q.add(childId);
                }
            }
        }

        return numOfNodes;
    }