AC Solution

AC Solution