Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Count of Smaller Numbers After Self
Hard
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Count number of smaller elements to the right of each element.
Sample Input:
[5,2,6,1]
Sample Output:
[2,1,1,0]
Hints
Hint 1
Use modified merge sort
Hint 2
Count during merge process
Hint 3
Track original indices
Code Editor
Reset
Run
Save
Loading...