Java program to get minimum cost to sort strings by reversal operation
class GFG { static class pair { int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } }