Skip to content

Commit

Permalink
ParallelSorting
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagogomes187 committed Aug 27, 2023
1 parent 9976038 commit c80338a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions ParallelSorting/ParallelSorting.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
26 changes: 26 additions & 0 deletions ParallelSorting/src/ParallelSortingExemplo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import java.util.Arrays;

public class ParallelSortingExemplo {

public static void main(String[] args) {

int[] meu_array = {5, 8, 1, 0, 6, 9, 50, -3};

for(int i : meu_array) {
System.out.print(i + " ");
}

/*****************************************************/

//Derterminar o intervalo que quero ordenar
Arrays.parallelSort(meu_array, 0, 5);

System.out.println();

for(int i : meu_array) {
System.out.print(i + " ");
}

}

}

0 comments on commit c80338a

Please sign in to comment.