Write a recursive method that has one integer parameter (n) and returns the number of binary strings of length n that do not have two consecutive 1's. You should not use any loops in your solution. For example, for n = 4, the number of binary strings of length 4 that do not contain two consecutive 1's is 8:
Comments
Leave a comment