diff --git a/DSA_Codesheet/Java/countSort.java b/DSA_Codesheet/Java/countSort.java new file mode 100644 index 0000000..d957fc0 --- /dev/null +++ b/DSA_Codesheet/Java/countSort.java @@ -0,0 +1,66 @@ +import java.util.*; + +public class countSort { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + int n = input.nextInt(); + int arr[] = new int[n]; + for(int i=0; i max) { + max = num; + } + if(num < min) { + min = num; + } + } + return new int[]{min, max}; + } +}