message: Update 10_Rotate Array.cpp
diff: @@ -45,19 +45,7 @@ Constraints:
  #include <bits/stdc++.h>
  using namespace std;
  -// } Driver Code Ends
  -class Solution
  -{
  -public:
  - //Function to rotate an array by d elements in counter-clockwise direction.
  - void rotateArr(int arr[], int d, int n)
  - {
  - // code here
  - }
  -};
  -
  -// { Driver Code Starts.
  int main()
  {
  @@ -72,17 +60,18 @@ int main()
  //input n and d
  cin >> n >> d;
  - int arr[n];
  + vector<int>arr(n);
  //inserting elements in the array
  for (int i = 0; i < n; i++)
  {
  cin >> arr[i];
  }
  - Solution ob;
  - //calling rotateArr() function
  - ob.rotateArr(arr, d, n);
  -
  + //Rotation solution
  + d=(d%n);
  + reverse(arr.begin()+d,arr.end());
  + reverse(arr.begin(),arr.begin()+d);
  + reverse(arr.begin(),arr.end());
  //printing the elements of the array
  for (int i = 0; i < n; i++)
  {
  