int solve(int N, int M, int K)Input:
4 2 2
Output: 2
Constraints:
1 <= N, M, K <= 10^3
int minTownsDiff(int N, vector<int>& towns, vector<vector<int>>& roads)Input:
2
10 20
1 2
Output: 10
Constraints:
1 <= N <= 10^5
1 <= towns[i] <= 10^4
using Song = pair<string, string>; // (artist, song)
void shuffle(vector<Song>& playlist)Input:
[
{ "artist": "A", "song": "apple" },
{ "artist": "A", "song": "banana" },
{ "artist": "B", "song": "orange" },
{ "artist": "B", "song": "guava" },
{ "artist": "C", "song": "mango" }
]Output: ABABC