Half-Edge Data Structure with holes I am trying to implement next/prev of edges in half-edge data structure. But I ran into this question. If there are two holes with a common vertex, will the closed loop of the edges run as in the first picture? Or will it be two separate cycles, as in the second picture?

In 3ds Max, when the border tool is used, it selects the edge loop as in the first image. Please help me to understand this.
The cube-like mesh shown in the images is a non-manifold mesh. Officially half edge data structures do not support such a topology. However, this case can be supported by continuing the boundary half edges through the non-manifold node. This is apparently the way it is done in 3DS Max, and also Blender. You can look at this article for several extension to the data structure to support non-manifold meshes.