Skip to content

LC-264. Ugly Number II #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hamidgasmi opened this issue Jul 5, 2020 · 1 comment
Closed

LC-264. Ugly Number II #227

hamidgasmi opened this issue Jul 5, 2020 · 1 comment
Assignees

Comments

@hamidgasmi
Copy link
Owner

The problem description is available here

@hamidgasmi hamidgasmi self-assigned this Jul 5, 2020
hamidgasmi pushed a commit that referenced this issue Jul 5, 2020
@hamidgasmi
Copy link
Owner Author

hamidgasmi commented Jul 5, 2020

It's completed 3 times:

  1. BFS approach: it was my 1st. intuition that turned out to be a false good idea
  2. Dynamic Programming + Min-heap: it optimizes my 1st approach. It's betten that my 1st. approach but it's still slow: O(nlogn)
  3. Dynamic Programming + Lists: it optimizes my 2nd. approach and has a linear running time.

hamidgasmi pushed a commit that referenced this issue Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant