Ask kind of algorithm

hello all i kindly need your help to analize what kind of algorithm in the game of math maniac (android game). i want to create a game just like that but different in function. math maniac is calculation with plus and the game i want create is multiple number :). doesn’t mean to copy the program just want it as a guide for me to create it. can i use boolean and knuth morris to create my game? or there is other algorithm that i need to use?
please help me sensei :stare: