How to solve a HackerRank Problem | Counting Valleys | Blog No 1.