Given n cities and undirected roads (edges), the network rank of two different cities is the total number of roads connected to either city, counting a road between them only once. Return the maximum network rank over all pairs of cities. The input is JSON {n, edges}.
Input: JSON {n, edges}.
Output: Integer — the maximal network rank.
Input: {"n":4,"edges":[[0,1],[0,3],[1,2],[1,3]]}
Output: 4
Explanation: Cities 0 and 1 give rank 4.Input: {"n":2,"edges":[[0,1]]}
Output: 1
Explanation: Shared road counted once.Input: {"n":3,"edges":[]}
Output: 0
Explanation: No roads.2<=n<=100