Learn Data Structures by Building the Merge Sort Algorithm - Step 6

Tell us what’s happening:

def merge_sort(array):
middle_point = len(array) // 2
left_part = array[:middle_point]
right_part = array[middle_point:]

how to call merg_sort function inside the function,?
The solutions already in the forum do not work.

Your code so far

def merge_sort(array):

# User Editable Region

    middle_point = len(array) // 2
    left_part = array[:middle_point]
    right_part = array[middle_point:]
    


# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge Information:

Learn Data Structures by Building the Merge Sort Algorithm - Step 6

Just call it the way you would normally call a function.

There are no instructions for arguments here so you can leave that empty.

Make sure you spell it correctly, though

–removed–
This is the actual solution of Step 6

1 Like

Glad you got it, please don’t share solution code though

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.