jeudi 4 janvier 2018

What is the minimum number of moves that we need in order to obtain two equal strings?

We have two strings A and B with the same super set of characters. We need to change these strings to obtain two equal strings. In each move we can perform one of the following operations:

1- swap two consecutive characters of a string 2- swap the first and the last characters of a string

Aucun commentaire:

Enregistrer un commentaire