Count of Smaller Number before itself(LintCode 249):

Problem