code: public static int min(int[] x) {
          int m = x[0];
  
          for (int n : x) {
              if (n < m) {
                  m = n;
              }
          }
  
          return m;
      }
docs: Returns the minimum value of an array.