Had to look up answer. Failed on modulo operations.
Had to look up someone elses answer. Failed on solving at all. Problem was graph problem:
- Transforming graph by removing 0-flow valves
- Caching previously seen states
Had to look at hints.
- Pruning of search space.
"Brute-force" approach (enumerate all side -> side transitions manually).
- Better solution would be to rotate the cube faces into the correct arrangement - 3D rotations