LC: 276. Paint Fence
https://leetcode.com/problems/paint-fence/
Input: n = 3, k = 2
Output: 6
Explanation: All the possibilities are shown.
Note that painting all the posts red or all the posts green is invalid because there cannot be three posts in a row with the same color.Input: n = 1, k = 1
Output: 1Input: n = 7, k = 2
Output: 42Last updated
