code: public int indexOf(int ele) {
          int i;
  
          for (i = 0; i < size; i++) {
              if (data[i] == ele) {
                  return i;
              }
          }
          return -1;
      }
docs: Searches an element.
  @param   ele  element to look for
  @return  index of the first element found; -1 if nothing was found