code: private boolean isLatticeBrokenBefore(int nodeIndex, ViterbiLattice lattice) {
          ViterbiNode[][] nodeEndIndices = lattice.getEndIndexArr();
  
          return nodeEndIndices[nodeIndex] == null;
      }
docs: Checks whether there exists any node in the lattice that connects to the newly inserted entry on the left side
  (before the new entry).
  
  @param nodeIndex
  @param lattice
  @return whether the lattice has a node that ends at nodeIndex