Skip to content

Comments

Collect words into String to reduce number of concats#7

Open
pavlo-liapota wants to merge 1 commit intodmcg:masterfrom
pavlo-liapota:improvements
Open

Collect words into String to reduce number of concats#7
pavlo-liapota wants to merge 1 commit intodmcg:masterfrom
pavlo-liapota:improvements

Conversation

@pavlo-liapota
Copy link
Contributor

Function permuteInto is generating unique results and we don't need to sort words, so we can go back to your previous way to construct prefix, i.e. have it as a String instead of List<String>. This way we are doing way less string concatenations.
Time has reduces from 3500 to 3100.

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