Question: Problem 1: Design an algorithm (preferably a source code) which takes the string length (n) and generates all possible strings with even number of 1s.
Problem 1: Design an algorithm (preferably a source code) which takes the string length (n) and generates all possible strings with even number of 1s. Example for n=3 output is 011, 101,110 Example for n=4 output is 0011,0101,1001,0110,1010,1100 Analysis the algorithms complexity.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
