code: private boolean isLatticeBrokenAfter(int endIndex, ViterbiLattice lattice) {
          ViterbiNode[][] nodeStartIndices = lattice.getStartIndexArr();
  
          return nodeStartIndices[endIndex] == null;
      }
docs: Checks whether there exists any node in the lattice that connects to the newly inserted entry on the right side
  (after the new entry).
  
  @param endIndex
  @param lattice
  @return whether the lattice has a node that starts at endIndex