From 1edb55bd678deddaee7ee11681e04fba08c6129d Mon Sep 17 00:00:00 2001 From: Skandha Date: Thu, 20 Oct 2022 07:08:54 +0530 Subject: [PATCH] Finished Left Rotation in C++ --- c++/Left Rotation.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 c++/Left Rotation.cpp diff --git a/c++/Left Rotation.cpp b/c++/Left Rotation.cpp new file mode 100644 index 0000000..d27bc84 --- /dev/null +++ b/c++/Left Rotation.cpp @@ -0,0 +1,34 @@ +#include +#include +using namespace std; +void rotateleft(int arr[],int d) +{ + int n = (sizeof(arr)/2)+1; + for(int i=0; i>n>>d; + int arr[n]; + cout<<"Enter the elements of the array : "; + for (int i=0; i>arr[i]; + } + rotateleft(arr,d); + return 0; +} +