Lintcode Programming Question 975 (Dynamic Programming)

Question Setup

Initially on a notepad only one character ‘A’ is present. You can perform two operations on this notepad for each step: