Tap here to switch tabs
Problem
Submissions

Problem: How Many Numbers Are Smaller Than the Current Number

Try to solve the How Many Numbers Are Smaller Than the Current Number problem.

Statement

Given an integer array nums, determine the number of elements in the array that are strictly smaller than each nums[i]. That is, for each index i, count the number of valid indices j such that j != i and nums[j] < nums[i].

Return the answer in an array.

Constraints:

  • 2≤2 \leq nums.length ≤500\leq 500

  • 0≤0 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: How Many Numbers Are Smaller Than the Current Number

Try to solve the How Many Numbers Are Smaller Than the Current Number problem.

Statement

Given an integer array nums, determine the number of elements in the array that are strictly smaller than each nums[i]. That is, for each index i, count the number of valid indices j such that j != i and nums[j] < nums[i].

Return the answer in an array.

Constraints:

  • 2≤2 \leq nums.length ≤500\leq 500

  • 0≤0 \leq nums[i] ≤100\leq 100