Posts

Showing posts with the label Happy Ladybugs

Happy Ladybugs

Image
                      Hacker Rank Solution  Happy Ladybugs Hey guys ,welcome to another blog on  hacker rank solution . this time we gonna discuss a hacker rank  algorithim  problem, which is named as  Happy Ladybugs. Problem: Problem Breakdown: First of all let us understand the problem statement---- As described in the question that ladybugs is board game and the board is represented by a String b , each Charcter of string shows the type(by color) of ladybug(insect) at that place. for ex if any charcter of the String is 'X' ,then that ladybug is of color X. There can be any of the 26 types of ladybugs (i.e. UpperCase alphabates i.e. A to Z) If any character of string is underscore (' _ ') then it represent an empty place. As described above that we have to determine that all the ladybugs in the string are happy or not ,if not then they can be made happy through some no....