To generate all N size strings (of 0s and 1s)

Goal: To generate N size strings made up of two constituents:

  • 0 and
  • 1

This program is a rudimentary means to illustrate backtracking and recursion.

If we have N=2 then these are the N size strings:

  1. 00
  2. 01
  3. 10
  4. 11

And the code in Java is provided here: