@@ -0,0 +1,1285 @@
+/**%0A * %0A */%0Apackage algorithms.implementation;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * Challenge: https://www.hackerrank.com/challenges/happy-ladybugs%0A * %0A * @author Sudharsanan Muralidharan%0A */%0Apublic class HappyLadyBugs %7B%0A  public static void main(String%5B%5D args) %7B%0A    Scanner in = new Scanner(System.in);%0A    int t = in.nextInt();%0A%0A    while (t-- %3E 0) %7B%0A      boolean happy = true;%0A      int%5B%5D values = new int%5B27%5D;%0A%0A      int n = in.nextInt();%0A      String b = in.next();%0A%0A      for (int i = 0; i %3C n; i++) %7B%0A        if (b.charAt(i) == '_') %7B%0A          values%5B26%5D++;%0A        %7D else %7B%0A          values%5Bb.charAt(i) - 'A'%5D++;%0A        %7D%0A      %7D%0A%0A      if (values%5B26%5D == 0) %7B%0A        for (int i = 0; i %3C n; i++) %7B%0A          boolean prev = false, next = false;%0A          if (i - 1 %3E= 0) %7B%0A            prev = b.charAt(i) == b.charAt(i - 1);%0A          %7D%0A%0A          if (i + 1 %3C n) %7B%0A            next = b.charAt(i) == b.charAt(i + 1);%0A          %7D%0A          %0A          if(!prev && !next) %7B%0A            happy = false;%0A            break;%0A          %7D%0A        %7D%0A      %7D else %7B%0A        for (int i = 0; i %3C 26; i++) %7B%0A          if (values%5Bi%5D == 1) %7B%0A            happy = false;%0A            break;%0A          %7D%0A        %7D%0A      %7D%0A%0A      System.out.println(happy ? %22YES%22 : %22NO%22);%0A    %7D%0A    in.close();%0A  %7D%0A%7D%0A

Add solution for HappyLadyBug problem