Media.net | OA | SSE | Mar-2021
Anonymous User
1386
Mar 06, 2021
Mar 07, 2021
Time: 60min
Number of Question: 2
Problem 1:
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/
Problem 2:
An array A is called "PrimeArray" if there is no two elements such that their product is a perfect square.
A = { 1, 3, 5, 4}
E.g. A[0]*A[3] = 4 which is 2*2
Hence A is not a "PrimeArray"
If A is not a "PrimeArray", increment any of the elements by 1 to transform A into a "PrimeArray" (incrementing any one element by 1 counts as one operation, you can perform any number of such operations on any number of elements).
Find minimum number of operations to transform array into a "PrimeArray".
Comments (1)


