Bending Spoons Interview Question

A logic question involving cards