- Searching for a single item in an array is 
O(N) - Searching for a longest run of increasing numbers in an array is 
O(N^2)if you use a straightforward algorithm with two nested loops* 
Note: This is not Java-specific.
* A faster algorithm exists to do this search.
solved Java Search algorithm [closed]