Example #1
0
def process(question, file):
    global __cmp_count__
    global __question__
    __cmp_count__ = 0
    __question__ = question
    integers = utils.read_integer_file(file)
    quick_sort(integers, 0, len(integers))
    return __cmp_count__
Example #2
0
def process(filename):
    integers = utils.read_integer_file(filename)
    return find_inversions(integers)