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