blossom algorithm