An LLT-type algorithm for computing higher-level canonical bases