Skip to main content

Posts

Showing posts with the label Java List Hackerrank Solution

Java List Hackerrank Solution

Java List Hackerrank Solution For Explanation Watch Video:  S ample Input 5 12 0 1 78 12 2 Insert 5 23 Delete 0 Sample Output 0 1 78 12 23 Code: import  java.io.*; import  java.util.*; public   class  Solution {      public   static   void  main(String[] args) {         Scanner scn =  new  Scanner(System.in);          int  n = scn.nextInt();         ArrayList<Integer> al =  new  ArrayList<>();          for ( int  i= 0 ;i<n;i++){              int  ele = scn.nextInt();             al.add(ele);         }  ...