Code link:https://ide.codingblocks.com/s/379895
Problem link: https://practice.geeksforgeeks.org/problems/inversion-of-array-1587115620/1#
I think the logic is correct but still getting WA. I have done this using merge sort.
Code link:https://ide.codingblocks.com/s/379895
Problem link: https://practice.geeksforgeeks.org/problems/inversion-of-array-1587115620/1#
I think the logic is correct but still getting WA. I have done this using merge sort.
hello @div_yanshu07
a)
in ur merge function , u r not copying ur temp array back to array arr.
b) mid is part of ur left array but u r considering it in right array.
correct them and it will work
Handled the cases you mentioned, but still getting WA.
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.