Dynamic algorithm implementation