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

I have tried to understand this challenge. I have created the while loop and tested the code. It does not pass. I tried creating the if statement conditionals with the OR operator , I tried with the two pipes || but I continue to get this message Your code raised an error before any tests could run. Please fix it and try again.

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

    merge_sort(left_part)
    merge_sort(right_part)

    left_array_index = 0
    right_array_index = 0
    sorted_index = 0


# User Editable Region

    while left < len(left_part) == len(right_part):
            left_array_index < len(left_part)
            right_array_index < len(right_part)
                array.append()  


# 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/120.0.0.0 Safari/537.36

Challenge Information:

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

why is array.append() indented in that way here?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.