Yeah, that's exactly the point. These kind of algorithms are far from easy to invent even if they look simple once they are known.