defminNumber(self, nums: List[int]) -> str: defqsort(l, r): if l >= r: return i, j = l, r # dual pointers while i < j: while s[j] + s[l] >= s[l] + s[j] and i < j: j -= 1 while s[i] + s[l] <= s[l] + s[i] and i < j: i += 1 s[i], s[j] = s[j], s[i] s[l], s[i] = s[i], s[l] qsort(l, i-1) qsort(i+1, r) s = [str(n) for n in nums] qsort(0, len(s) - 1) return''.join(s)