Blossom algorithm