Leetcode 264. Ugly Number II
Vložit
- čas přidán 13. 10. 2021
- An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5.
Given an integer n, return the nth ugly number.
Example 1:
Input: n = 10
Output: 12
Explanation: [1, 2, 3, 4, 5, 6, 8, 9, 10, 12] is the sequence of the first 10 ugly numbers.
Example 2:
Input: n = 1
Output: 1
Explanation: 1 has no prime factors, therefore all of its prime factors are limited to 2, 3, and 5.
Great explaination. Just want to point out the reason for 1 being a ugly number -
Any ugly number can be represented by (2^x) * (3^y) * (5^z) where x, y and z are integers.
If x = y = z = 0, then (2^0) * (3^0) * (5^0) = 1 * 1 * 1 = 1
Wow!! Amazing Solution!
Best explanation after looking at number of videos
great explanation. Now this is my go to channel for Leetcode problems solution.
Di you explain so well. Can you please start uploading the daily leetcode challenge video.
beautiful explaination of ugly numbers.
great explanation as always
Great explanation
Thanks di for the explanation 🔥
great explanation
please continue in explanation problems
Amazing explanation
Nice explanation 💯💯
great explanation
Please do mention the Time and space complexity also for each que that you solve. That will be really helpful !
usko khud nahi pta
@@abhinavpahwa6036 she is sde @ Microsoft and A Ex IIT Bombay student :)
@@bishalkundu7592 ig you don't know how Microsoft hires.
@Bishal Kundu specifically when it comes to hire female candidates.🫠
Her understanding of concepts shows how she got into Microsoft.
@@abhinavpahwa6036 still you are here
really nicely explained
amazing explanation
This video deserve more views
Yrr I really needed this explanation ✌️😕
question is ugly, but your explanation was beautiful :)
Haha thanks xD
thankyou mam
How u come up to this solution I am doing Leetcode from last 2 months still not able to solve without help of CZcams video. Plz tell m what should I do
Hey, keep practising, I am sure you will get there!!
Who is sitted backside of you ??😅😅
mummy
is it only me or the video isnt synced with ur voice ?
But you are pretty
Great explanation
Good explanation
Great explanation