Skip to main content

Posts

Showing posts with the label Day 7: Arrays Hackerrank Solution Java

Day 7: Arrays Hackerrank Solution Java

 Day 7: Arrays Hackerrank Solution Java For Explanation Check The Video: Sample Input 4 1 4 3 2 Sample Output 2 3 4 1 Code: import  java.io.*; import  java.math.*; import  java.security.*; import  java.text.*; import  java.util.*; import  java.util.concurrent.*; import  java.util.regex.*; public   class  Solution {      private   static   final  Scanner scanner =  new  Scanner(System.in);      public   static   void  main(String[] args) {          int  n = scanner.nextInt();         scanner.skip( "(\r\n|[\n\r\u2028\u2029\u0085])?" );          int [] arr =  new   int [n];         String[] arrItems = scanner.nextLine().split( "...