Closed ddalama closed 3 years ago
Hello,
my github repo: https://github.com/ddalama/dsa-java
For this line, return Comparator.naturalOrder().compare(array[i], array[j]);
I am getting the following error in my HybridSortHW: required type: T, T Provided: T, T
Please guide me as to how to solve this.
@ddalama you cannot call the compare() method from naturalOrder(). You need to define your own Comparator as a variable and call compare() from that variable.
compare()
naturalOrder()
Comparator
Hello,
my github repo: https://github.com/ddalama/dsa-java
For this line, return Comparator.naturalOrder().compare(array[i], array[j]);
I am getting the following error in my HybridSortHW: required type: T, T Provided: T, T
Please guide me as to how to solve this.