leetcode 计算右侧小于当前元素的个数 python 之利用归并排序的思想

不容易啊
需要记录计数器,还有记录原来的位置,很麻烦

class Solution(object):
    def countSmaller(self, nums):
        """
        :type nums: List[int]
        :rtype: List[int]
        """
        def merge(A,B,counterA,counterB,indexA,indexB):
            a_cur=0
            b_cur=0
            M=[]
            counterM=[]
            counterM_ind=[]
            while a_cur

你可能感兴趣的:(leetcode 计算右侧小于当前元素的个数 python 之利用归并排序的思想)