My issue
can any explain the logic used to solve this problem??
My code
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int l=sc.nextInt();
int r=sc.nextInt();
int n=r-l+1;
int a[]=new int[n];
int x=l;
for(int i=0;i<n;++)
a[i]=x++;
int b[]=new int[n];
b=Collections.reverse(Arrays.asList(a));
}
}
}
Problem Link: Make It One Practice Coding Problem - CodeChef