Problem Brief
Count Elements with at Least One Smaller and One Greater Value
INTERNOA
See Uber online assessment and hiring insights
You are given an array of integers, count the number of elements having at least one smaller value and at least one greater value.
Input:
The input to the solution function consists of an integer array Nums.
Output:
Return the count.
1Example 1
Input
nums = [1, 2, 3]
Output
1
Explanation
Only element 2 satisfies the condition.
Constraints
Limits and guarantees your solution can rely on.
na