Code Zone
Labels
BareMinimum
Done
FrequentlyAsked
RecentQuestions
Revise
Sunday, September 30, 2012
Number of inversions
Given an array. Find the number of inversions (if ith element is greater than jth element where i<j)
Eg: arr = {3,5,7,2,8}
Output: 3 ( 3>2, 5>2, 7>2)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment