[algogeeks] find sol!!

2011-07-09 Thread Sriganesh Krishnan
(1*1!+2*2!+3*3!+4*4!+10*10!)/11! . is there any shortcut methods to solve such problems? find the odd one out... 13700, 1597, 326, 65, 16 , 6 , 2 and i have no clue to how to solve the second question -- You received this message because you are subscribed to the Google

[algogeeks] any tough aptitude questions!!!!

2011-07-09 Thread Sriganesh Krishnan
hey guys, do you know any website that offers really good aptitude questions...like interview aptitude questions!!! i think those are really tough than anything that we find in books -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

[algogeeks] array or matrix problems...anyone?

2011-07-08 Thread Sriganesh Krishnan
can anybody suggest some good array or matrix related problems! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] array or matrix problems...anyone?

2011-07-08 Thread Sriganesh Krishnan
it :P On Fri, Jul 8, 2011 at 9:40 PM, Sriganesh Krishnan 2448...@gmail.comwrote: can anybody suggest some good array or matrix related problems! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks

Re: [algogeeks] puzzle

2011-07-06 Thread Sriganesh Krishnan
i think this puzzle follows arithmetic progression...i'm not sure though...does anybody have a clean explanation for this? On Wed, Jul 6, 2011 at 10:35 PM, shiv narayan narayan.shiv...@gmail.comwrote: * You are given 2 eggs. * You have access to a 100-storey building. * Eggs can be very hard

Re: [algogeeks] puzzle

2011-07-06 Thread Sriganesh Krishnan
@tiru and @aseem: explanation pls...! On Wed, Jul 6, 2011 at 11:11 PM, TIRU REDDY tiru...@gmail.com wrote: 14 On 6 Jul 2011 22:35, shiv narayan narayan.shiv...@gmail.com wrote: * You are given 2 eggs. * You have access to a 100-storey building. * Eggs can be very hard or very fragile

Re: [algogeeks] Google Interview

2011-06-30 Thread Sriganesh Krishnan
can anybody give an example...pls.. On Thu, Jun 30, 2011 at 9:26 AM, Jitendra singh jsinghrath...@gmail.comwrote: kthlargest(a[],b[],lefta,righta,leftb,rightb,k) { mida=lefta+(righta-lefta)/2; midb=leftb+(rightb-leftb)/2; if(a[mida]bmidb])

Re: [algogeeks] Re: strings

2011-06-23 Thread Sriganesh Krishnan
[]=abcdaabcdefe; int buff[256]={0}; for(int i=0;istrlen(inp);i++) buff[inp[i]]++; for(int j=0;j256;j++) while(buff[j]--) cout(char)j; On Wed, Jun 22, 2011 at 10:27 AM, Sriganesh Krishnan 2448...@gmail.comwrote: Input will be a string. We need to o/p a string

Re: [algogeeks] Re: strings

2011-06-23 Thread Sriganesh Krishnan
oh...an array of constant length signify's constant memorywhy dint i see that...thanks guys!!! regards ---sriji!! On Thu, Jun 23, 2011 at 6:35 PM, Sriganesh Krishnan 2448...@gmail.comwrote: ya i needed the same thing! On Wed, Jun 22, 2011 at 3:04 PM, saurabh singh saurab

Re: [algogeeks] O(n) Time is the problem. ..

2011-06-23 Thread Sriganesh Krishnan
can you explain mewhat the logic is...behind the xor operation?...is it like inversion or encryption? On Thu, Jun 23, 2011 at 11:59 AM, sunny agrawal sunny816.i...@gmail.comwrote: initially compute xor of all the values from 0 to n in a variable Temp so temp = 0^1^2^n let result

Re: [algogeeks] Minimum draws for correct labels

2011-06-21 Thread Sriganesh Krishnan
nice!! On Tue, Jun 21, 2011 at 10:47 PM, Nitish Garg nitishgarg1...@gmail.comwrote: The answer is 1 only as stated in the above posts. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] sort the array

2011-06-21 Thread Sriganesh Krishnan
ya...we can do it in O(n) n time!!! nice question! On Tue, Jun 21, 2011 at 11:01 PM, himanshu kansal himanshukansal...@gmail.com wrote: @anika: yar merge sort vl tk nlogn timeinstead u cn do dt maintain two ptrs one at the beginning and one intitially pointing to middle of the array...

[algogeeks] strings

2011-06-21 Thread Sriganesh Krishnan
Input will be a string. We need to o/p a string with the order of characters same as the input but with same characters grouped together. I/P: abcdacde O/P: aabccdde I/P: kapilrajadurga O/P: kpilrrjdug I/P: 1232 O/P: 1223 …….. O(n) time……….. O(1) space…. how can you approach these