Tap here to switch tabs
Problem
Submissions

Problem: Count Elements With Strictly Smaller and Greater Ones

Count Elements With Strictly Smaller and Greater Ones asks you to count elements in an array that have at least one strictly smaller and one strictly greater value somewhere in the array.

Statement

Given an integer array nums, return the number of elements that have both a strictly smaller and a strictly greater element present in nums.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • −105≤-10^5 \leq nums[i] ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Elements With Strictly Smaller and Greater Ones

Count Elements With Strictly Smaller and Greater Ones asks you to count elements in an array that have at least one strictly smaller and one strictly greater value somewhere in the array.

Statement

Given an integer array nums, return the number of elements that have both a strictly smaller and a strictly greater element present in nums.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • −105≤-10^5 \leq nums[i] ≤105\leq 10^5