Solutions for common algorithm competitions