hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

8.9K
active users

Šimon Tóth

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: compiler-explorer.com/z/TTshG4
Solution: compiler-explorer.com/z/EPx4vo