Acm basic training questions and algorithms