count number of chars smaller than str [ i ] fron str [ i + 1 ] to str [ len - 1 ]
countRight = findSmallerInRight ( st , i , ln - 1 ) NEW_LINE rank = rank + countRight * mul NEW_LINE i = i + 1 NEW_LINE return rank NEW_LINE