fast algorithm quicker