FavoritYadhu Krishnan (Inno Valley Works) postete in Bangalore Developer User Group (Ursprünglich gefragt von Yadhu Krishnan)21. Dez. 2023, 13:47Yadhu KrishnanDoes anyone know what sorting algorithm does the Comparator Interface use?We can implement different sort orders with the Comparator interface’s compare() method, and pass the Comparator as a parameter to List.sort(). Does anyone know what sorting algorithm the Comparator Interface uses or will we be able to implement any of the sorting algorithms as per our need?Since it looks like it is using the bubble sort from the example given here:https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_System_Comparator.htm#apex_interface_System_Comparator_ExampleMehr anzeigenKommentar hinzufügenKommentar schreiben...FettKursivUnterstreichenDurchstreichenListe mit GliederungspunktenNummerierte ListeLink hinzufügenCodeblockBild einfügenDateien anhängenLink-URLAbbrechenSpeichern0/9000Antworten
Yadhu KrishnanDoes anyone know what sorting algorithm does the Comparator Interface use?We can implement different sort orders with the Comparator interface’s compare() method, and pass the Comparator as a parameter to List.sort(). Does anyone know what sorting algorithm the Comparator Interface uses or will we be able to implement any of the sorting algorithms as per our need?Since it looks like it is using the bubble sort from the example given here:https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_System_Comparator.htm#apex_interface_System_Comparator_ExampleMehr anzeigen