in an N numbers of array a number is a X element if it is divisible by atleast one other element in the array. Program to find how many such elements exists in an given array
example 1 : in array [1,2,3] , number of X elements is 2 ( 2 and 3 as they are divisible by number 1 )
example 2 : in array [2,3,5,8] , number of X elements is 1 ( 8 is divisible by 2 )
example 3 : in array [2,3,6,12] , number of X elements is 2 ( 6 is divisible by 2 and 3 , 12 is divisible by 2 and 3 and 6 )
Write a memory efficient program to solve this problem.