code: public static <E extends Comparable<E>> boolean isSorted(E[] array) {
          for(int i = 0; i < array.length - 1 ; i++) { 
              if(array[i].compareTo(array[i + 1]) > 0) {
                  return false;
              }
              
          }
  		
          return true;
      }
docs: Check if the array is sorted. It loops through the entire
  array once, checking that the elements are sorted.
  
  <br>
  <br>
  
  <i>Runtime: </i> O(n)
  
  @param <E> the type of elements in this array.
  
  @param array the array to check
  @return <i>true</i> if the array is sorted, else <i>false</i>.