small cpp files demonstrate algorithm