title: Finding 10,000th smallest number in the series (3^i * 5^j * 7^k) where i,j,k >= 0 using data structures
body: <p>How can I solve the following problem using Data Structures?</p>
  
  <p>3^i * 5^J * 7^k where i,j,k >=0. find the 10, 000th smallest number in this series.</p>
  
  <p>I solved it using sets in the following way, which I feel is not an efficient solution:</p>
  
  <ul>
  <li>initial set is (1)</li>
  <li>multiply each element of the set by numbers 3,5 and 7 to get the next set.</li>
  <li>take a union with previous set.</li>
  <li>if the size of set is greater than or equal to 10,000, stop the process of multiplication and sort the set in ascending order.</li>
  <li>10,000th element of the set will be the 10,000th smallest number.</li>
  </ul>
  
  <p>Is there any other data structure which can solve this problem more efficiently?</p>