public class Ass {
public static boolean Issorted(int arr [],int idx) {
if(idx==arr.length){
return true;
}
if(arr[idx]<arr[idx+1]){
return Issorted(arr,idx+1)
} else {
return false;
}
}
public static void main(string args[]){
int arr[]={1,9,3} ;
System.out.println(Issorted(arr,0));
}
}
0 Comments