Arrays: Left Rotation

  • + 0 comments

    Is calculation really required ?

    for(int i=k; i < a.length; i++){
        System.out.print(a[i] + " ");
    }
    for(int i=0; i < k; i++){
        System.out.print(a[i] + " ");
    }