Solution (source code)

= Solution

The choice $\delta=1$ labels an interval positively and its complement negatively, while $\delta=-1$ reverses those labels. On three ordered points, every subset is either a consecutive block or the complement of a consecutive block, so all eight labelings occur. Thus three points are shattered.

Four ordered points are not shattered: the alternating labeling $+,-,+,-$ has neither its positive set nor its negative set consecutive, so it cannot arise from an interval or its complement. Therefore
$$
\boxed{VC(H_2)=3.}
$$