LeetCode 264 | Ugly Number II | Solution Explained (Whiteboard + Java)

preview_player
Показать описание
A continuation of the first problem. Let me know what you guys think about this dynamic programming problem.

Running Time: O(1) precomputed
Space Complexity: O(1) precomputed

Always be pluggin:
Рекомендации по теме
Комментарии
Автор

Keep making them videos bro! Thank you!

almortada
Автор

You're amazing!! Keep up the good work. This helps a lot. Thanks

steverogers
Автор

Good solution. Hope you keep uploading

devdev
Автор

Cheers for the video, I finally understand this

borlorbao
Автор

Great content! you can also use a min heap to maintain the order of the Ugly numbers instead of using Math.min method.

cosmoatlas
Автор

use for loop upto n only why to iterate upto 1675

saunaknandi
Автор

Hey Xavier, great explanation! May I know the app you used to project iPad whiteboard to the Mac? It's much easier on my neck to look at sketches on the screen instead of the iPad. Thanks!

codingcat
Автор

You know, this code was as simple as it gets and most of us get it that it WORKS.
The idea should be to explain the intuition behind it/ why does it work?

Thanks!

duedares