Challenge: Generate Binary Numbers From 1 to n Using a Queue

Try to solve the Generate Binary Numbers From 1 to n Using a Queue problem.

We'll cover the following

Statement

Given a number n, generate a list of binary numbers from 11 to n in the form of a string using a queue.

Constraints:

  • 11\leq n 1000\leq 1000

Examples

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.