Tuesday common C++ interview question: Swinging movement
Given a starting position and a destination (positive integer coordinates), determine whether the destination can be reached using a swinging movement. That is, we can move from a position of (x,y) to either (x+y,y) and (x,x+y).
Solve it yourself: https://compiler-explorer.com/z/TTshG4Ph3
Solution: https://compiler-explorer.com/z/EPx4vo4ez