Re: [algogeeks] Google written test

2012-03-19 Thread atul anand
@Gene : your code will work fine by changing the argument passed from main(), you just need to call rite f(n, 1, 1); from main instead of f(n, 1, 0); On Mon, Mar 19, 2012 at 10:10 AM, atul anand wrote: > @all : i guess question is on Fibonacci coding. > > here you can find the algo :- > > http

Re: [algogeeks] Google written test

2012-03-18 Thread atul anand
@all : i guess question is on Fibonacci coding. here you can find the algo :- http://en.wikipedia.org/wiki/Fibonacci_coding On Sun, Mar 18, 2012 at 2:58 AM, Atul Singh wrote: > @Ravi... there should be only one answer as for fibonacci representation > of a number we have to include the part

Re: [algogeeks] Google written test

2012-03-17 Thread Atul Singh
@Ravi... there should be only one answer as for fibonacci representation of a number we have to include the part of the fibonacci number just less than the number then remaining part of the sum is filled by fibonacci numbers starting from 1 suppose we have to convert 6 into fibonacci representati

Re: [algogeeks] Google written test

2012-03-17 Thread Ravi Ranjan
@ if for a given number more than 1 answer exist then whats the answer??? -- 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 algogeek

Re: [algogeeks] Google written test

2012-03-17 Thread Sourabh Chandak
20 multiple choice questions out of which around 10 were from the GATE '12 paper. 1 coding question: Represent a no in its Fibonacci representation. Ex- 15 can be represented as 100010 (1*13+0*8+0*5+0*3+1*2+0*1) On Sat, Mar 17, 2012 at 6:39 PM, Ronit Douglas wrote: > Hello! > > I got to know th

[algogeeks] Google written test

2012-03-17 Thread Ronit Douglas
Hello! I got to know that Google visited several colleges in last week. They will be visiting my campus on 20th. Please let us know pattern & questions if you know. Thanks, - RD -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to thi

[algogeeks] Google written

2012-03-07 Thread Ronit Douglas
Hello All! Google is going to visit my campus soon. Hence, I want to know - - Format of the test - Qs - in case you remember - Coding question in the apti Please reply if you have information about this. Thanks :) -- You received this message because you are subscribed to the Google

Re: [algogeeks] google written

2011-01-15 Thread Ashish Goel
see the string as S.S` where S` is all but the last char of S. now in this string for all valid char set, find the least weight char say for example a in a-z. Store its positions in hash-map(hash is O(1) fn). Now for each of these positions,call recursively n times, finally set will have only 1 st

Re: [algogeeks] google written

2011-01-14 Thread juver++
@qw Please ignore my post. I've already removed it. Cause I found it seems to be ok. -- 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

Re: [algogeeks] google written

2011-01-14 Thread Wei.QI
@juver++, can you give me a test case that will time out? On Fri, Jan 14, 2011 at 6:44 AM, juver++ wrote: > @qw > I think you solution will timed out?! > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send ema

Re: [algogeeks] google written

2011-01-14 Thread juver++
@qw I think you solution will timed out?! -- 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 algogeeks+unsubscr...@googlegroups.com.

Re: [algogeeks] google written

2011-01-14 Thread Wei.QI
FindStartIndex(char[] a) { int start = 0; int current = 1; while(current < a.Length) { if(a[current] < a[start]) { start = current; ++current; }else if(a[current] > a[start]) { ++current; }else //a[current]

Re: [algogeeks] google written

2011-01-14 Thread radha krishnan
There s O(n) solution for this :) On Fri, Jan 14, 2011 at 2:13 PM, radha krishnan wrote: > append the string to original string and > index=answer of that spoj problem > now u can ouput the string from index to index+strlen(originalstring)-1 > > On Fri, Jan 14, 2011 at 2:12 PM, radha krishnan >

Re: [algogeeks] google written

2011-01-14 Thread radha krishnan
append the string to original string and index=answer of that spoj problem now u can ouput the string from index to index+strlen(originalstring)-1 On Fri, Jan 14, 2011 at 2:12 PM, radha krishnan wrote: > wow > This s a spoj problem > http://www.spoj.pl/problems/MINMOVE/ > > On Fri, Jan 14, 2011 a

Re: [algogeeks] google written

2011-01-14 Thread radha krishnan
wow This s a spoj problem http://www.spoj.pl/problems/MINMOVE/ On Fri, Jan 14, 2011 at 1:40 PM, snehal jain wrote: > Write the code to find lexicographic minimum in a circular array, e.g. > for the array > BCABDADAB, the lexicographic mininum is ABBCABDAD. > > -- > You received this message becau

[algogeeks] google written

2011-01-14 Thread snehal jain
Write the code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic mininum is ABBCABDAD. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroup