[algogeeks] Re: Facebook Campus Test Question

2011-11-05 Thread Sahil Hariram
Hey what was the facebook question at IIT Roorkee? On Nov 5, 6:04 pm, saket saket.ma...@gmail.com wrote: As far as I have googled about the 'game of life' problem, of which this question is a variant ; no mathematical pattern/series emerges out of it ... but in this problem since the moves

[algogeeks] Re: Facebook Campus Test Question

2011-11-04 Thread Dumanshu
plz post a samle input output.. On Nov 4, 10:24 am, sunny agrawal sunny816.i...@gmail.com wrote: What can be a better solution than a Brute Force O(N^2* No of iteration) -- Sunny Aggrawal B.Tech. V year,CSI Indian Institute Of Technology,Roorkee  fb1_input.txt 1KViewDownload  

Re: [algogeeks] Re: Facebook Campus Test Question

2011-11-04 Thread sunny agrawal
i/p o/p files are attached in the post, see carefully :-o On Fri, Nov 4, 2011 at 6:23 PM, Dumanshu duman...@gmail.com wrote: plz post a samle input output.. On Nov 4, 10:24 am, sunny agrawal sunny816.i...@gmail.com wrote: What can be a better solution than a Brute Force O(N^2* No of

[algogeeks] Re: Facebook Campus Test Question

2011-11-04 Thread Dumanshu
is ur brute force O(1) for space? On Nov 4, 10:24 am, sunny agrawal sunny816.i...@gmail.com wrote: What can be a better solution than a Brute Force O(N^2* No of iteration) -- Sunny Aggrawal B.Tech. V year,CSI Indian Institute Of Technology,Roorkee  fb1_input.txt 1KViewDownload  

Re: [algogeeks] Re: Facebook Campus Test Question

2011-11-04 Thread sunny agrawal
No,O(N^2) because all the flips happens simultaneously, it can be reduce to O(2N) if each tile is represented using a single bit On Fri, Nov 4, 2011 at 11:12 PM, Dumanshu duman...@gmail.com wrote: is ur brute force O(1) for space? On Nov 4, 10:24 am, sunny agrawal sunny816.i...@gmail.com