First version of the valid palindrome problem. 

Naive approach, O(n) time complexity.Should have space for optimization.
Ex. when 'head' is ready, no need to re-validate on it again when preparing the 'tail' 
First version of the Triangle problem.

Adapted a bottom-up approach, space compexity is O(n), where n is the total number of rows (or, the number of elements in the last row).