code: public List<String> toList() {
          List<String> result;
  
          result = new ArrayList<String>();
          for (int i = 0; i < size; i++) {
              result.add(data[i]);
          }
          return result;
      }
docs: TODO