code: public void addToCell(int index, int element) {
          if (cells.size() < index + 1) {
              addSingletonCell(element);
          } else {
              cells.get(index).add(element);
          }
      }
docs: Add an element to a particular cell.
  
  @param index the index of the cell to add to
  @param element the element to add