Topic: Backtracking Problem / Level: beginner

Problem: Generate all possible ways to rearrange books on a shelf while considering genre constraints.

Run the code to see the output here...