In how many ways can you tile a 3xn rectangle with 2x1 dominoes?
问题 Everyday I struggle with algorithm questions and try to ask here which I can't answer. Excuse me, if I cause any headache. Anyway, Here is the problem from the University of Waterloo ACM Programming Contest. In how many ways can you tile a 3xn rectangle with 2x1 dominoes? Nirvana : smells like recursion spirit 回答1: You can solve this by using dynamic programming. Check this for a possible solution. 回答2: Just an explicit solution to the equations given implicitly in taskinoor's answer: Or f[n]