@@ -0,0 +1,714 @@
+class Solution:%0A    %22%22%22%0A    @param A: A list of integer%0A    @return: The number of element in the array that %0A             are smaller that the given integer%0A    %22%22%22%0A    def binSearch(self, nums, q):%0A        if len(nums) == 0 or nums%5B-1%5D %3C q:%0A            return len(nums)%0A        l, r, res = 0, len(nums) - 1, 0%0A        while l %3C= r:%0A            m = (l + r)/2%0A            if nums%5Bm%5D %3C q:%0A                res += m + 1 - l%0A                l = m + 1%0A            else:%0A                r = m - 1%0A        return res%0A%0A    def countOfSmallerNumber(self, A, queries):%0A        # write your code here%0A        A.sort()%0A        res = %5B%5D%0A        for q in queries:%0A            res.append(self.binSearch(A, q))%0A        return res%0A

Create CountofSmallerNum_001.py