Count the Inversions
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- hard
- Pro
An inversion is a pair of positions where the earlier element is larger than the later one. Count the inversions in a list faster than checking every pair.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.