Saw this problem and was just wondering what the correct approach is. Is there some mathematical pattern or some way to avoid reconstructing a large portion of the triangle?