The problem statement contains an image.
In VLSI design it's important to connect certain pairs of points on a circuit using as little wire as possible.
Given an empty circuit board of size N x N, we want to connect the two points A_{1} and A_{2}
with each other using one wire, and the two points B_{1} and B_{2} with each other using another wire.
The wires must go along the horizontal and vertical edges on the grid (see figure), and the two wires may not
share a common vertex.
Create a class ConnectingPoints containing the method shortestWires, which takes an int
N, the number of vertices on one side of the circuit board, and a pair of int[], X and Y,
each containing four elements. Elements 0 and 1 in X and Y contain the coordinates for
A_{1} and A_{2}, and elements 2 and 3 in X and Y contain the coordinates for
B_{1} and B_{2}. The method should return the minimum length of wires needed
to connect A_{1} with A_{2} and B_{1} with B_{2}. If it's not
possible to connect the points, return 1 (see example 1).
