Happy Ladybugs, is a HackerRank problem from Implementation subdomain. In this post we will see how we can solve this challenge in Python

Problem Description

The board is represented by a string, , of length . The character of the string, , denotes the cell of the board.

If is an underscore (i.e., _ ), it means the cell of the board is empty.

If is an uppercase English alphabetic letter (ascii[A-Z]), it means the cell contains a ladybug of color ....

You can find the full details of the problem Happy Ladybugs at HackerRank

Solution: Please check the happy-ladybugs.py snippet for the solution.

This solution originally posted at: Github by @srgnk