Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java parallel sort

//for big data we can use multiple threads for faster sorting
int[] arr={1,2,3,4,5,2,4};
//using parallelsort()
Arrays.parallelSort(arr);
//using stream
int[] arr=Arrays.stream(arr)
  .parallel()
  .sorted()
  .toArray();
 
PREVIOUS NEXT
Tagged: #java #parallel #sort
ADD COMMENT
Topic
Name
2+4 =