• + 0 comments

    try this code without failing the testcases // Write your code here int count=0; int countone=0; for (int i = 0; i < apples.size(); i++) { apples.set(i,apples.get(i)+a);

    }
    for(int num:apples){
        if(num>=s&&num<=t){
            count++;
        }
    
    }
            System.out.println(count);
    
    
    
    for (int j = 0; j < oranges.size(); j++) {
        oranges.set(j,oranges.get(j)+b); 
    }
    for(int num:oranges){
        if(num>=s&&num<=t){
            countone++;
        }
    }  
    
            System.out.println(countone);
    
    
    
    }
    

    }