You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a list of numbers check which of the numbers are power of 2 and which are not. For example, Given (1, 3, 4, 7, 8) You should return another list having (1, 0, 1, 0, 1) as 1, 4, 8 are power of 2 (2^0, 2^2, 2^3), and 3 & 7 are not.
So complete the function findPowers() which accepts the array as parameter and return another array as shown above.