Solved Connected Sets from Interview Street challenges