[algogeeks] Re: puzzle

2012-08-11 Thread Piyush
How can I find the expected number of tosses , required to obtain a {HT,TH,TT} , by using random variables?? On Friday, December 31, 2010 8:27:46 PM UTC+5:30, Dave wrote: > > @Anuj and Bittu: It is not necessary to know the bias. You can > simulate the flip of an unbiased coin with multiple flip

Re: [algogeeks] Constant time solution needed

2012-08-11 Thread ~*~VICKY~*~
May be you can consider creating a 2d array to pre process and store all the rectangle sums as a dependent subproblem, the sum of larger rect will be currValuesAdded+OldRectSum. So when you get the coordinate as input u can calc the needed sum by subtracting sum of big rect and small rect which is

Re: [algogeeks] Constant time solution needed

2012-08-11 Thread adarsh kumar
Sum of the integers meaning? Do you mind giving an example test case? regards. On Sat, Aug 11, 2012 at 7:10 PM, Srividhya wrote: > hi all:) > > The coordinates of a rectangle will be specified. there is a matrix of > integers. yo should find the sum of the integers that fall in the region > spe

Re: [algogeeks] Re: AMAZON: given col id, print col name in excel

2012-08-11 Thread yq Zhang
No. It's not base 26 at all. Given input 26, your code will return ba, but the result should be aa. It's not equivalent to a number. On Sat, Aug 11, 2012 at 2:57 AM, shiv narayan wrote: > yes actually we have to print a,b,c..z instead of nos , so for that i have > stored nos in character array s

[algogeeks] Constant time solution needed

2012-08-11 Thread Srividhya
hi all:) The coordinates of a rectangle will be specified. there is a matrix of integers. yo should find the sum of the integers that fall in the region specified by the coordinates . The solution to be in constant time . -- You received this message because you are subscribed to the Google

[algogeeks] INTRVIEW QUESTION

2012-08-11 Thread payal gupta
Given the start and an ending integer as user input, generate all integers with the following property. Example : 123 , 1+2 = 3 , valid number 121224 12+12 = 24 , valid number 1235 1+2 = 3 , 2+3 = 5 , valid number 125 1+2 <5 , invalid number -- You received this message because you are subscri

Re: [algogeeks] Re: AMAZON: given col id, print col name in excel

2012-08-11 Thread shiv narayan
yes actually we have to print a,b,c..z instead of nos , so for that i have stored nos in character array so only characters will be printed not nos On Sat, Aug 11, 2012 at 2:18 AM, yq Zhang wrote: > @shiv, your code is correct go compute the base 26 number. However, this > question is not base

Re: [algogeeks] Data Cache implementation problem

2012-08-11 Thread ~*~VICKY~*~
It very much looks to be max heap with frequency as value. So maximum frequent item will be the root and so on. O(logN) complexity for search On Sat, Aug 11, 2012 at 1:18 PM, Navin Kumar wrote: > I think best data structure would be "Optimal BST" > > > On Fri, Aug 10, 2012 at 11:47 PM, Kumar Vish

Re: [algogeeks] google paper

2012-08-11 Thread ~*~VICKY~*~
Can you share the coding questions asked. Thank you. On Fri, Aug 10, 2012 at 10:29 PM, Abhishek Kumar wrote: > two coding Qs + some mcqs(more than 1 option correct),time is 1.5 hr.. > > > On Fri, Aug 10, 2012 at 4:06 PM, deepikaanand wrote: > >> Somebody from DCE plz tell the paper pattern of goo

Re: [algogeeks] Data Cache implementation problem

2012-08-11 Thread Navin Kumar
I think best data structure would be "Optimal BST" On Fri, Aug 10, 2012 at 11:47 PM, Kumar Vishal wrote: > Huffman tree ??? > > > On Fri, Aug 10, 2012 at 11:38 PM, Varma Selvaraj wrote: > >> A data cache needs to be implemented for the top 100 data items selected >> based on their frequency

Re: [algogeeks] google paper

2012-08-11 Thread Abhishek Kumar
two coding Qs + some mcqs(more than 1 option correct),time is 1.5 hr.. On Fri, Aug 10, 2012 at 4:06 PM, deepikaanand wrote: > Somebody from DCE plz tell the paper pattern of google... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > T

Re: [algogeeks] Data Cache implementation problem

2012-08-11 Thread Kumar Vishal
Huffman tree ??? On Fri, Aug 10, 2012 at 11:38 PM, Varma Selvaraj wrote: > A data cache needs to be implemented for the top 100 data items selected > based on their frequency of access. > The most frequent data member must be accessed fastest. And the access > time/iterations of each data

[algogeeks] Questions asked in directi

2012-08-11 Thread Abhi
1st round ( MCQ questions based on aptitiude, DBMS, OS etc) 30 questions were there:- 1) count number of ones in binary representation of 1 to 100 2) ACID (databases) 3) A C program was given with 4 forks().we had to find number of times it prints "hello world" (answer - 26) 4)2-3 questions re