Spokes Wheel
InterviewTime limit1sMemory limit256 MB
Find the fewest left or right rotations that turn the first 32-spoke binary pattern into the second, or report that it is impossible.
- Level
Easy3 of 10
- Topics
- Bit manipulation, Brute force
- Solved
- No attempts yet
Problem
A 32-spoke wheel has each spoke tagged 0 or 1. Given hex states before and after rotation, find the minimum number of left or right rotations that transforms the first state into the second.
Input
Test count , then each line has two 32-bit hex values and .
Output
Print Case #X: Y Left, Y Right, Y Any, or Not possible.