SPOJ solutions, general tricks and interview practice questions