Re: [algogeeks] Re: Most compatible people

2012-07-07 Thread Akshat Sapra
This is the simple pattern finding problem in which we have to find the most frequent patterns of persons that listens/vote for the same band. Here we can apply the frequent pattern algorithm like FP Tree or Apriori algorithm. Link for the tutorial of FP tree is given below

Re: [algogeeks] MS Design Ques

2012-07-07 Thread sravanreddy001
i was thinking of character array. which is same as string. Any thoughts on better alternatives? On Friday, 6 July 2012 13:34:01 UTC-4, anshu wrote: yes, We can have much better data structure for storing big integer instead of string just for simplicity I have taken string. On Fri, Jul 6,

Re: [algogeeks] MS Design Ques

2012-07-07 Thread Anshu Mishra
Best will be storing BIG_INT in array of integers. int [] val; //store actual number int size; // required length of val array. take the string as input for constructors and convert it into 2's complement form, maintaining little endian order or big endian order. Perform other operation keeping

[algogeeks] flipkart question

2012-07-07 Thread Hraday Sharma
You are given 2 dice. Both are fair. One of the dice has no numbers printed on it. You have to label the unmarked dice such that when both the dice are thrown, the sum on the faces is evenly distributed between 1 and 12 . -- You received this message because you are subscribed to the Google

Re: [algogeeks] flipkart question

2012-07-07 Thread Raj Asati
plz explain ur ans .how it is calculated? On Sat, Jul 7, 2012 at 12:54 PM, Amol Sharma amolsharm...@gmail.com wrote: Three 0's and Three 6's. 36 possibilities and 12 possible values of sum, so each sum should come in 3 possibilities and hence three 0's and three 6's. -- Amol Sharma

[algogeeks] Help about compile in LISP

2012-07-07 Thread Victor Manuel Grijalva Altamirano
The next code, it's about the problem Eight Queens, i found it in internet, but i'm new in LISP and i donĀ“t know how to compile it... Can you help me? (defun find-queen (arr p d) (destructuring-bind ((px py) (dx dy)) (list p d) (do ((x px (+ x dx)) (y py (+ y dy))) ((not

Re: [algogeeks] flipkart question

2012-07-07 Thread Prakhar Jain
Label 3 of the faces with 0 and other 3 faces with 6. -- Prakhar Jain IIIT Allahabad B.Tech IT 3rd Year Mob no: +91 9454992196 E-mail: rit2009...@iiita.ac.in jprakha...@gmail.com On Sat, Jul 7, 2012 at 12:52 AM, Hraday Sharma hradaysha...@gmail.comwrote: You are given 2 dice.

Re: [algogeeks] flipkart question

2012-07-07 Thread Abhishek Sharma
@Raj: trace karke dekh na yaar when u have 3 0s and 3 6s.. the sum distribution would look like this: given below are the possibilities: Combination of 1,2,3,4,5,6 with 0 1+0 = 1 2+0 = 2 3+0 = 3 OR 4+0 = 4 5+0 = 5 6+0 = 6 Combination of 1,2,3,4,5,6 with 6 1+6 = 7 2+6 = 8 3+6 = 9 OR 4+6

[algogeeks] Secure computation of Intersection of two sets

2012-07-07 Thread Sairam
How do you find the intersection of two sets in a secured way? Which means imagine a situation where there is a client who has got a set S1={1,2,3}, and there is a server who has got a set S2[{2,3}. Client wants to find the count of intersection which is |S1 intersection S2| = 2. But, it