1. Given a positive integer N. 2. Print all the numbers from 1 to N in binary form. 3. This is a functional problem. 4.You should code only the function.
Input Format
Positive integer is given
Output Format
Print each binary number with a space
Constraints
1 <= T <= 10^6 1 <= N <= 10^6
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
5
Output
1 10 11 100 101