Super Ugly Number
1. You are given an array(arr) of size k which contains prime numbers in ascending order, and an integer N. 2. You have to find Nth super ugly number. 3. Super ugly number is defined as the number whose prime factors are elements of the given array. Assumption -> 1 is the first super ugly number.
1 <= K <= 100 1 <= arr[i] <= 1000 1 <= N <= 10^6
A number K arr1 arr2.. K prime numbers in ascending order A number N
A number representing Nth super ugly number.
4 3 5 7 11 13