Skip to content

Comments

String Rotation coded in C++#5

Open
smort-callie wants to merge 1 commit intoShreyaPrasad1209:mainfrom
smort-callie:patch-2
Open

String Rotation coded in C++#5
smort-callie wants to merge 1 commit intoShreyaPrasad1209:mainfrom
smort-callie:patch-2

Conversation

@smort-callie
Copy link

@smort-callie smort-callie commented Oct 21, 2020

Complexity=O(n) (not sure)

Complexity(2n^2) (not sure)
int main() {
string a, b;
cin >> a >> b;
rotate(a, b);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add "return 0" here. Else everything looks perfect! 😄

@ShreyaPrasad1209
Copy link
Owner

Complexity is O(n) because you're using find() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants