Getting NZEC in SPATH SPOJ.

This is MY SOLUTION for the problem SPATH, I don’t know why I am getting NZEC, anyone please help me to figure out what is wrong with my code.

You cannot create arrays of parameterized types.

Try replacing

`static List<Pair> adj[] = new List[10002];`

with

static List<List<Pair>> adj = new ArrayList<>();

and if you are using The Class List Please import all of its methods as well.

Check more here

@rds_98

If this was the case them my code should not even work locally.

@vijju123

can you take a look at this.