Programming Question

Question: Design an algorithm to find the kth number such that the only prime factors are 3,5, and 7. Note that 3, 5, and 7 do not have to be factors, but it should not have any other prime factors. For example, the first several multiples would be (in order) 1,3,5,7,9,15,21.

From: Cracking the Coding Interview [McDowell]

Subject: Hard

Load Another Question


Select a Subject