Tell us what’s happening:
i don’t understand why this code doesn’t work. The step 3 says that i should slice the array list in a half and assign the two sublist to new arguments. Why the platform, using this code, says that I should use the slice syntax to extract the left half and assign it to the left_part variable and doesn’t let me pass ste step. Socrates say that my syntax is not valid in JavaScript but this is a python course.
Your code so far
def merge_sort(array):
middle_point = len(array) // 2
# User Editable Region
left_part = array[:mid]
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Challenge Information:
Implement the Merge Sort Algorithm - Step 3