Implement strategy pattern for algorithms