0

I have two strings which I need to compare and permute. What is the best way of doing this?

Given a string "asdfpoit" what is the best way to rerrange it to match another string "poitasdf"?

I know this can be done using nested for loops... but is there a better/faster way of doing this?

2
  • Use recursion, not nested for loops. See the linked duplicate. Commented Nov 21, 2014 at 19:58
  • @AntarrByrd I am trying to re-arrange a string to match another string Commented Nov 21, 2014 at 20:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.