Dynamic growth. Using linked lists or a resizing array, develop a weighted quick-union implementation that removes the restriction on needing the number of objects ahead of time. Add a method newSiteO to the API, which returns an int identifier.
private class Connection {int p;int q;public Connection(int p, int q){ this.p = p; this.q = q; }}Record to encapsulate connections
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.