Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 775. Global and Local Inversions
Given a permutation nums of 0..n-1, determine whether every global inversion is also a local inversion (i.e., the counts are equal). This is equivalent to checking that there are no inversions between elements separated by two or more indices — no pair (i, j) with j >= i+2 and nums[i] > nums[j].
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.