Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Effecient Algorithm Discussion

$
0
0

I have come to know about an interesting algorithm based question . Question is as follws----

**I have two permutation of same string without any space ..... EX--- ASCBD and ACSDB

**I have to calulate minimum no of operation to make these string two permutation identical using the following operation ---

  1. any character i of a string can be switched with its any one of its adjacent character .

Operations can take place in only one strng or on both the strings.

I serching in the internet but find only BRUTE-FORCE......Kindly suggest me a effecient approach ...??


Viewing all articles
Browse latest Browse all 40121


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>