Skip to content

Ugly Numbers using Dynamic Programming #164

@abhisheks008

Description

@abhisheks008

🔴 Title : Ugly Numbers using Dynamic Programming
🔴 Language used : Python 3
🔴 Directory : Dynamic Programming
🔴 Name : Abhishek Sharma
🔴 Contribution type :

  • Hacktoberfest 2021
  • Contributor

🔴 Description :
Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … shows the first 11 ugly numbers. By convention, 1 is included.
Given a number n, the task is to find n’th Ugly number.

Examples:

Input  : n = 7
Output : 8

Input  : n = 10
Output : 12

Input  : n = 15
Output : 24

Input  : n = 150
Output : 5832 

🔴 Method : Dynamic Programming

@prathimacode-hub Please assign me this issue, I'll be contributing as a Hacktoberfest 2021 participant.

Metadata

Metadata

Assignees

Labels

AssignedIssue is assignedHACKTOBERFESTThis issue is applicable for Hacktoberfest 2022

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions