Add algorithm header and ensure we return uniform vector.