Hackerrank Growth In 2 Dimensions Solution