Question: In the assign 2 . py file, implement the recursive function called generateReverseOrder ( ) , which generates all length - n strings of 0

In the assign2.py file, implement the recursive function called generateReverseOrder(), which generates all length-n strings of 0s and 1s, for a given non-negative integer n, in order from largest to smallest (aka, descending order).
Your function must have n as the only parameter and must return a list containing all length-n strings of 0s and 1s (in the correct order).
Run the code to get an idea of what the expected output should look like.
Note: The test output examples are in descending order, since if you consider them as binary numbers, they start at 2n-1 and decrement each time.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!