Triangle

Version II -- better performance, solve this problem from bottom to up