Solve diameter and shortest bridge problems | Meta