Skip to content
Advertisement

Mergesort in java

I am new to Java and have tried to implement mergesort in Java. However, even after running the program several times, instead of the desired sorted output, I am getting the same user given input as the output. I would be thankful if someone could help me understand this unexpected behaviour.

JavaScript

Advertisement

Answer

Here is a corrected version of your code:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement