Count Elements With Strictly Smaller and Greater Elements Problem

Count Elements With Strictly Smaller and Greater Elements Problem — ExecCode Easy DSA Practice

Solve the Count Elements With Strictly Smaller and Greater Elements problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Description Given an integer array nums, return the number of elements that have both a strictly smaller and a strictly greater element appear in nums. Examples Example 1 Input: nums = [11,7,2,15] Output: 2 Explanation: The element 7 has the element 2 strictly smaller than it an…

Practice Count Elements With Strictly Smaller and Greater Elements free on ExecCode. Browse more ExecCode DSA problems.