Created
June 9, 2022 21:30
-
-
Save piusayowale/0c4d53543d75b60248326c8924ab5222 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vector<int> rotLeft(vector<int> a, int d) { | |
vector<int> temp(a.size()); | |
int i = 0; | |
for(i = 0; d+i < a.size(); i++){ | |
temp[i] = a[d+i]; | |
std::cout << temp[i]; | |
} | |
int t = 0; | |
while(i < a.size()){ | |
temp[i] = a[t]; | |
i++; | |
t++; | |
} | |
return temp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment