What's the difference between Arrays.sort() and Arrays.parallelSort() ? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

What's the difference between Arrays.sort() and Arrays.parallelSort() ?

When to use parallelSort()?

28th Jun 2016, 2:29 PM
Chaie Li
Chaie Li - avatar
2 ответов
0
arrays.sort() means sorting an arry in ascending or in reverse order, e.g. 3,4,1,2 it will become 1,2,3,4 in ascending format
28th Jun 2016, 2:37 PM
Gerald Flores
Gerald Flores - avatar
0
you should use parallelsort when your sort method is taking time to sort or you have very large set of element in an array. make sure you hav cpu or core free bcz parallelsort is resource consuming
1st Jul 2016, 7:14 AM
Nitin Kumar
Nitin Kumar - avatar