com.mhhe.clrs2e
Class MinMax

java.lang.Object
  |
  +--com.mhhe.clrs2e.MinMax

public class MinMax
extends java.lang.Object

Implements Minimum and Maximum from page 184 of Introduction to Algorithms, Second edition.


Constructor Summary
MinMax()
           
 
Method Summary
static java.lang.Comparable maximum(java.lang.Comparable[] array)
          Returns the largest element in an array.
static java.lang.Comparable minimum(java.lang.Comparable[] array)
          Returns the smallest element in an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinMax

public MinMax()
Method Detail

minimum

public static java.lang.Comparable minimum(java.lang.Comparable[] array)
Returns the smallest element in an array.

Parameters:
array - The array.

maximum

public static java.lang.Comparable maximum(java.lang.Comparable[] array)
Returns the largest element in an array.

Parameters:
array - The array.