Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try all possible ways of assignment.
If we can store the assignments in form of a state then we can reuse that state and solve the problem in a faster way.
Solve with full IDE support and test cases