• + 0 comments

    java

    if(d==arr.size()){
        return arr;
    }else{
        List<Integer> list1=new LinkedList<>();
        List<Integer> list2=new LinkedList<>();
        list1=arr.subList(0, d);
        list2=arr.subList(d, arr.size());
        list2.addAll(list1);
        return list2;
    }