|All-time Popular Problems|
|Maximum difference between node and its ancestor|
|Count nodes of linked list|
|Find first set bit|
|Angle between hour and minute hand|
|Recursively remove all adjacent duplicates|
|Remove every k'th node|
|Merge Two Sorted Arrays|
|Spirally traversing a matrix|
|Merge two sorted linked lists|
|Longest Increasing Subsequence|
Count number of binary strings without consecutive 1’s
Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s. Output your answer mod 10^9 + 7.
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows.
Each test case contain an integer N representing length of the binary string.
Print the count number of binary strings without consecutive 1’s of length N.
1 ≤ T ≤ 100
1 ≤ N ≤ 100
For first test case 5 strings are (000, 001, 010, 100, 101)
For second test case 3 strings are (00,01,10)