problems on trains shortcuts with explanation