Generate the nth term of the count-and-say sequence.
Find the nth ugly number using heap-based approach