← Flipkart questions

Generate ugly numbers in ascending order

Filed under Flipkart

Write a function to generate the n-th ugly number, where ugly numbers are positive integers whose only prime factors are 2, 3, and 5.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Flipkart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.