Adding top-down solution for Triangle