- Write a method named
inorder( ) that:
- takes an array of integers
as a parameter and
- returns
the count of elements
that are smaller
than the element immediately following it.
|
Example:
Input array: 3, 7, 8, 5, 4, 9
Method returns 3, because:
3, 7, 8, 5, 4, 9
3, 7, 8, 5, 4, 9
3, 7, 8, 5, 4, 9
|
|