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.