Printing 1 to N in Binary Using Queue
Originally posted on PH Bytes:
One of the popular interview question asked on queue data structure: Write a program to print the numbers from 1 to N in Binary Representation using QUEUE data structure. Example: Input: N = 3 Output: 1, 10, 11 Input: N= 5 Output: 1, 10, 11, 100, 101 Code will follow…