We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
importjava.io.*;importjava.util.*;publicclassSolution{publicstaticvoidmain(String[]args){/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */intn,i,b,j;Scannersc=newScanner(System.in);n=sc.nextInt();int[]a=newint[n];for(i=0;i<n;i++){a[i]=sc.nextInt();}for(j=a.length-1;j>=0;j--){System.out.print(a[j]+" ");}}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays - DS
You are viewing a single comment's thread. Return to all comments →
Its very easy passed all the test cases