To Mr. B
how will you find median in O(n) time? please elaborate.
On Wednesday, July 11, 2012 4:01:43 AM UTC+5:30, Mr.B wrote:
I found a similar solution looking somewhere else.
The solution for this problem is:
a. There can be atmost 3 elements (only 3 distinct elements with each
@sachin: you can find median in linear sort.
http://valis.cs.uiuc.edu/~sariel/research/CG/applets/linear_prog/median.html
On Wed, Jul 11, 2012 at 12:28 PM, sachin goyal sachingoyal@gmail.comwrote:
To Mr. B
how will you find median in O(n) time? please elaborate.
On Wednesday, July 11,
@sachin:
http://valis.cs.uiuc.edu/~sariel/research/CG/applets/linear_prog/median.html
On Wed, Jul 11, 2012 at 12:28 PM, sachin goyal sachingoyal@gmail.comwrote:
To Mr. B
how will you find median in O(n) time? please elaborate.
On Wednesday, July 11, 2012 4:01:43 AM UTC+5:30, Mr.B
Well, we can do one thing but it might not work in all cases.
First of all you need to know the node structure. Assume it has an int and
a next pointer.
Assumption - Memory allocation for nodes did not happened at random
location but uniformly.
1. Find out the memory address contained in the
@abinesh:
The solution given has a very very high complexity. as it finds all
possiblilities and tests each one of it.
is it *n*[(2n!)/(n! * n!)]* -- This is exponential solution. I am not sure
but, there must be a DP solution to this .
--Sravan Reddy
On Wed, Jul 11, 2012 at 12:15 AM, arumuga
Even if assuming the allocation is uniform.
Knowing the address of previous node is the limitation on SLL in constant
time.
Also, if we know the address of previous node. we are done. But, finding it
will take O(n) time.
On Wednesday, 11 July 2012 03:36:46 UTC-4, invictus wrote:
Well, we can
char str[5] , *p , str1[]=tatapower;
p=str1
while(*p)
{
if(*p=='t'||*p=='a')
if(str==NULL)
strcpy(str,*p);
else
strcat(str,*p);
p++;
}
On Tuesday, 10 July 2012 16:15:16 UTC+5:30, amrit harry wrote:
--
You received this message because you are subscribed to the Google Groups
anybody have informaton regarding questions asked in written and
interview of capillary technology for developer post
please share at bhardwaj.ankit...@gmail.com
thanks in advance.
On 5/22/12, Navin.nitjsr navin.nit...@gmail.com wrote:
If the matrix is 4-connected, we can use the same matrix.
hi
I am looking for some web links where i can find problem solving questions and
method that one can use to solve the problems that are asked in
interviews.Please let me know if you came across one.
Thanks
Rag
--
You received this message because you are subscribed to the Google Groups
hi ..
can anybody tell the Nth term of the following series...
9 96 685 4992.
--
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
can some body please explain voting algo to me .
On Wed, Jul 11, 2012 at 12:42 PM, Navin Kumar algorithm.i...@gmail.comwrote:
@sachin:
http://valis.cs.uiuc.edu/~sariel/research/CG/applets/linear_prog/median.html
On Wed, Jul 11, 2012 at 12:28 PM, sachin goyal
http://uva.onlinejudge.org/index.php
http://www.careercup.com/
http://www.codershunt.com/
http://www.cs.sunysb.edu/~skiena/392/programs/
https://www.interviewstreet.com/challenges/#
and in last
topcoder, codechef and stack overflow all three are best...
On Wed, Jul 11, 2012 at 10:37 AM, raghavan
@Gupta: Given the balance scale and only the eight coins, with no knowledge
of the values of their weights, here is an algorithm, probably not optimal,
to label each coin x, y, a, or b, with three x's, three y's, one a, and one
b.
1. Weigh the coins pairwise, c1 vs c2, then min(c1,c2) vs
13 matches
Mail list logo