void leftRotatebyOne(int arr[], int n){
        int temp = arr[0], i;
        for (i = 0; i < n - 1; i++)
          arr[i] = arr[i + 1];
      
        arr[n-1] = temp;
      }

      Cpp language logoLeft Rotate Array by one

      Cpp recipes

      This code rotates the array left by one position.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.