Given an undirected graph with n nodes labeled 0..n-1 and a list of edges, build its adjacency list: for each node, the sorted list of its neighbors. Return the adjacency list as a nested array where entry i lists node i's neighbors in ascending order. The input is JSON {n, edges}.
Input: JSON {n, edges}.
Output: Nested array — sorted neighbors of each node.
Input: {"n":5,"edges":[[0,1],[0,2],[1,3],[2,4]]}
Output: [[1,2],[0,3],[0,4],[1],[2]]
Explanation: Each node's neighbors, sorted.Input: {"n":1,"edges":[]}
Output: [[]]
Explanation: Single isolated node.Input: {"n":2,"edges":[[0,1]]}
Output: [[1],[0]]
Explanation: One edge both ways.1<=n<=10^50<=edges<=2*10^5undirected