Back to Questions

Count of Smaller Numbers After Self

50.7K viewsAsked at Tesla
Hard

Question Explain

Given an integer array `nums`, return an array `counts` where `counts[i]` is the number of elements to the right of `nums[i]` that are strictly smaller than `nums[i]`. Use a modified Merge Sort or Fenwick Tree/Segment Tree.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question