package hackerrank;

import java.util.Scanner;

/**
 * https://www.hackerrank.com/challenges/the-love-letter-mystery
 */
public class TheLoveLetterMystery {
    private static int loveLetterMystery(String str) {
        // TODO:
        return 0;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int testCases = in.nextInt();
        for (int t = 0; t < testCases; t++) {
            String str = in.next();
            System.out.println(loveLetterMystery(str));
        }
    }
}

@@ -217,16 +217,613 @@
     
-// TODO:
+int count = 0;%0A        char%5B%5D chars = str.toCharArray();%0A        for (int i = 0, j = chars.length - 1; i %3C j; i++, j--) %7B%0A            char left = chars%5Bi%5D;%0A            char right = chars%5Bj%5D;%0A            if (left != right) %7B%0A                if (left %3C right) %7B%0A                    while (left %3C right) %7B%0A                        right--;%0A                        count++;%0A                    %7D%0A                %7D else if (left %3E right) %7B%0A                    while (left %3E right) %7B%0A                        left--;%0A                        count++;%0A                    %7D%0A                %7D%0A            %7D%0A        %7D
 %0A   
@@ -834,17 +834,21 @@
  return 
-0
+count
 ;%0A    %7D%0A

Solve The Love Letter Mystery