Re: [algogeeks] Re: HOW TO CALCULATE THA size of union

2012-12-10 Thread ashish mann
union A{ long int y[5]; union B{ double g; union C{ int k; union D{ char ch; int x[5]; };

[algogeeks] LOGIC!!!

2012-08-30 Thread ashish mann
Q. A company organizes two foreign trips for its employees yearly. Aim of the trip is to increase interaction among the employees of the company and hence company wants each of his employee to see new people on the trip and not even a single person with whom he has worked in past. Therefore it is

Re: [algogeeks] Missing Number in an array

2011-07-18 Thread ashish mann
A little better way would be x + y = p = (n*(n+1))/2 - (sum of all elements of array). x * y = q = n! / (product of all elements of the array). now solve the quadratic eqn. z^2 - (sum of the roots)z + (product of the roots) = 0 On Mon, Jul 18, 2011 at 5:27 PM, varun pahwa