Super Ugly Number – Extension of Ugly Number Problem

Problem: The problem is an extension of Ugly number problem. Problem Link : Here [Courtesy geeksforgeeks]


Ugly Number Problem

Problem: The problem of ugly number is a common DP problem. Description: Ugly numbers are positive numbers whose prime factors only include 2,3,5,7. For example, 6,8 are ugly while 14 is not ugly since it includes another prime factor 7.Note that 1 is typically treated as an ugly number. courtesy:


Number that are not divisible [Paytm]

Problem: Find the number of non-divisible numbers in a range starting from 1 to N, for a given set. Problem Link [Courtesy:] Appeared as interview question in Paytm. Solution: The given set is {2,3,4,5,6,7,8,9,10}. The set can be minimized to {2,3,5,7} as these are the prime numbers and rest of the numbers of the




Critical t get the question but easy to solve. Problem asks to find the maximum length of minimum distance.