Find the nth ugly number using dynamic programming and three pointers.
Constraints
Example
>>> nth_ugly_number(1) 1 >>> nth_ugly_number(10) 12 >>> nth_ugly_number(11) 15 >>> nth_ugly_number(1690) 2123366400
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints