Most efficient algorithm to check if a number is prime July 8, 2019 16 32 64 128 Find next greater number with same set of digits Maximum product of three numbers leetcode