Solutions for a programming challenge