def partition(the_list, start, end):
    """
    Break the_list into two segments and return the split-point.

    This implementation makes use of the first value as the pivot.
    """
    # Choose an data-point for value-comparison (a.k.a. pivot)
    pivot = the_list[start]

    left_marker = start + 1
    right_marker = end
    
    done = False
    while not done:
        # Keep moving the left_marker rightwards until a value
        # greater than the pivot is met.
        while left_marker <= right_marker and the_list[left_marker] <= pivot:
            left_marker += 1

        # Keep moving the right_marker leftwards until a value
        # smaller than the pivot is met.
        while the_list[right_marker] >= pivot and right_marker >= left_marker:
            right_marker -= 1

        if right_marker < left_marker:
            # markers have crossed - iteration complete
            done = True
        else:
            # Swap the values at both markers
            temp = the_list[right_marker]
            the_list[right_marker] = the_list[left_marker]
            the_list[left_marker] = temp

    # The right_marker now points to the last element that's smaller than pivot.
    # All elements after the right_marker are greater than pivot.
    # We need to put the pivot value into it's rightful place.
    temp = the_list[right_marker]
    the_list[right_marker] = the_list[start]
    the_list[start] = temp

    # The right_marker now holds a value that's in the correct place.
    # So the_list is now split into two unsorted parts by the right_marker
    # Therefore, the split-point we're looking for is the right_marker

    return right_marker