MERGESORT CHALLENGE


what is the error in my code i am unable to debug it

Hey @naazsayma123, I found the following error in your code.

temp=arr[i]

You have declared temp as an empty list like temp=[]. So I guess temp=arr[i] is not the correct way of adding elements in the list. You will have to append elements to the list like this :

temp.append(arr[i])

This same mistake is there in every while loop. Please check and correct the concept as I have explained above.

I hope this helps ! :+1:
Happy Coding ! :smile:

@Aayushkh_333
https://ide.codingblocks.com/s/391486 it still showing same

Hey @naazsayma123, there are some conceptual errors as well. Would you like to try and build the logic again yourself or you want me to give the solution to you ??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.