Skip to content

optimised code - #8

Open
Sujan242 wants to merge 1 commit into
akashdeeps19:masterfrom
Sujan242:master
Open

optimised code#8
Sujan242 wants to merge 1 commit into
akashdeeps19:masterfrom
Sujan242:master

Conversation

@Sujan242

Copy link
Copy Markdown

1)string.push_back(char) is an O(1) operations as compared to concatenation which is O(n).
2)memset is much faster than a for loop for the initialization of an array

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.

1 participant