| 26 | import bisect |
| 27 | |
| 28 | class Solution(object): |
| 29 | def countSmaller(self, nums): |
| 30 | """ |
| 31 | :type nums: List[int] |
| 32 | :rtype: List[int] |
| 33 | """ |
| 34 | |
| 35 | x = [] |
| 36 | result = [] |
| 37 | |
| 38 | for i in nums[::-1]: |
| 39 | result.append(bisect.bisect_left(x, i)) |
| 40 | bisect.insort(x,i) |
| 41 | |
| 42 | return result[::-1] |
nothing calls this directly
no outgoing calls
no test coverage detected