Generate nth ugly number

mediumSolve on LeetCode
Last edited: August 9, 2025