I am not using extra space as i am not allocating new memory for storing
Nodes
i m using just 2 pointers on the same list, i think that will be allowed
On Wed, Jun 29, 2011 at 8:18 PM, Nishant mittal.nishan...@gmail.com wrote:
@sunny plz tell me the solution without using extra list...i've
/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
that means they all are same.
Recurrence of the algorithm can be written as follows (considering N rows, M
columns and two sub matrix formed contains about half rows
T(N,M) = 2T(N/2,M-1) + O(MN)
i think TC for this will be O(N^2lgN)...not sure :)
Any thing better we can do ??
--
Sunny Aggrawal
=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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 unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you
?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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 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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny
/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
and Conquer solution can do it in O(n). I just came to know
..thanks
i little bit similer to my approachNice One
On Sat, Jun 25, 2011 at 9:15 PM, Dave dave_and_da...@juno.com wrote:
@Sunny. You are reading too much into that. There is no mention that
the data are 32-bit integers
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
hmm i also doubt that
but it is Strictly O(32n) not O(nlgn) where lgn = 32 depending upon value
of n
On Fri, Jun 24, 2011 at 1:10 PM, rizwan hudda rizwanhu...@gmail.com wrote:
@sunny: Think again, your solution will take O(n*log(n)), where log(n) is
the number of bits to represent
the number
.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
@Dave it is given in Question that elements of array are integer
On Sat, Jun 25, 2011 at 7:17 AM, Dave dave_and_da...@juno.com wrote:
@Sunny: What makes you think that the integers are 32 bits in length.
Remember that O(.) notation applies as n -- infinity. Thus, O(n log
n) is correct
to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group
.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
LCS stands for Longest Common Substring
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed
:11 AM, oppilas .
jatka.oppimi...@gmail.comwrote:
Sunny,
Can but can we modify this code to get the *node X and node Y*?.
On Wed, Jun 22, 2011 at 8:32 AM, Anantha Krishnan
ananthakrishnan@gmail.com wrote:
@sunny agrawal
*Thanks a lot.*
*Great code. I got the logic
last line is
*in worst case k=1 only 2*n comparisons will be there hence O(n)*
On Thu, Jun 23, 2011 at 11:26 AM, sunny agrawal sunny816.i...@gmail.comwrote:
Lets Consider the case of Naive matching in which at some shift s first k
characters are matched and next character does not match so
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
no we can divide also with in the same loop
On Tue, Jun 21, 2011 at 3:20 PM, PRAMENDRA RATHi rathi
prathi...@gmail.comwrote:
@sunny if we calculate (n-r+1)*(n-r+2).*n first and then divide this
value by r!..
then this method will fail with little large value of n..because first
value
this problem is same as
*http://www.codechef.com/problems/MARBLES/*
solution to this are public
u can check for more clarification
On Tue, Jun 21, 2011 at 3:51 PM, sunny agrawal sunny816.i...@gmail.comwrote:
if it is given tha final answer fits in 64 bit signed integer then
we can run a loop
...@gmail.com
wrote:
@ sunny i am not getting ur apporach
but i am thinking like this..
taking an array from and intilize it to n to n-r
a[1000];
int k=0;
for(int i=n;i=n-r;i--)
a[k++]=i;
for(int y=n-r;y1;y--)
for(j=0;jk;j++)
if(a[j]%y==0)
{a[j]=a[j]/y;break;}
for example we take
i have already mentioned that if final answer fits in 64 bit integer then it
will not overflow
On Tue, Jun 21, 2011 at 5:34 PM, Dumanshu duman...@gmail.com wrote:
@Sunny: the value can still overflow because
Using the while loop u r dividing the res value whenever possible. so
the while
at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B
i dont know why r u thinking so but this was my accepted solution for the
problem.
On Tue, Jun 21, 2011 at 7:34 PM, kartik sachan kartik.sac...@gmail.comwrote:
hey sunny suppose u have to calculate 100c50 then there is a lot of
chances of over flow becoz u have to multiply 100 to 50
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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny
see this
*
https://ideone.com/1ZtIq*
On Tue, Jun 21, 2011 at 10:23 PM, Anantha Krishnan
ananthakrishnan@gmail.com wrote:
Thanks.
I expect more details in implementation point of view.
Thanks Regards,
Anantha Krishnan
On Tue, Jun 21, 2011 at 6:41 PM, sunny agrawal sunny816.i
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
and Expected value should be
2.5^(N-1)*(7/2)
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
will print yes
Correct me if i m wrong
Test case:
XXO
XXO
..O
Ans: No
tell me what is your output for this case
On Fri, Jun 17, 2011 at 1:56 PM, KK kunalkapadi...@gmail.com wrote:
@sunny:
This test:
if(! ( (countx == counto + 1) || (countx == counto) ) )
cout no endl
kunalkapadi...@gmail.com wrote:
@sunny: why the answer for the case u mentioned is no.. those are
possible set of moves according to me and hence my program outputs
yes
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
where n is ??
On Fri, Jun 17, 2011 at 3:23 PM, Arpit Sood soodfi...@gmail.com wrote:
i have got AC with O(n)
On Fri, Jun 17, 2011 at 2:59 PM, sunny agrawal sunny816.i...@gmail.comwrote:
you need to try something better as limits of A and B are very large :)
you can not run a loop from
but limits of A and B are very large
10^15
how is this possible
am i missing something,
like Max(B-A) = 10^6 or 10^7
On Fri, Jun 17, 2011 at 3:30 PM, Arpit Sood soodfi...@gmail.com wrote:
lol, i mean in linear time
On Fri, Jun 17, 2011 at 3:27 PM, sunny agrawal sunny816.i
the final result in the order of no of bits
O(64)
On Fri, Jun 17, 2011 at 3:38 PM, sunny agrawal sunny816.i...@gmail.com
wrote:
but limits of A and B are very large
10^15
how is this possible
am i missing something,
like Max(B-A) = 10^6 or 10^7
On Fri, Jun 17, 2011 at 3:30 PM, Arpit Sood
email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny
/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
yes copy pasting the exact thing :)
for better understanding :)
On Thu, Jun 16, 2011 at 8:06 PM, Navneet Gupta navneetn...@gmail.comwrote:
@Sunny, it is good that you follow Bruce Eckel, but copy pasting the exact
thing? :)
On Thu, Jun 16, 2011 at 7:34 PM, keyan karthi
keyankarthi1
@Arpit
Thanks to Bruce Eckel :D
On Thu, Jun 16, 2011 at 9:00 PM, Arpit Sood soodfi...@gmail.com wrote:
@sunny thanks, that post did clear the confusion.
On Thu, Jun 16, 2011 at 8:17 PM, Navneet Gupta navneetn...@gmail.comwrote:
Then i would suggest you give the original reference
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute
consider the case.
n = 2;
heap 1 - no of coins 1
heap 2 - no of coins 2
On Wed, Jun 15, 2011 at 5:34 PM, sunny agrawal sunny816.i...@gmail.comwrote:
i think u r wrong
what if heap size -1 is 0
i think one should pick atleast one coin else game will draw
On Wed, Jun 15, 2011 at 5:17 PM
the the heaps are of size 1 the Player 1 can win always.
Thanks,
Immanuel
On Wed, Jun 15, 2011 at 5:36 PM, sunny agrawal sunny816.i...@gmail.comwrote:
consider the case.
n = 2;
heap 1 - no of coins 1
heap 2 - no of coins 2
On Wed, Jun 15, 2011 at 5:34 PM, sunny agrawal
sunny816.i
the other coin from heap1.
Player 1 will take both the coins in heap 2.
Thanks,
Immanuel
On Wed, Jun 15, 2011 at 6:33 PM, sunny agrawal sunny816.i...@gmail.comwrote:
check out this case
n = 2
both heaps having 2 coins
player 2 will win i think
On Wed, Jun 15, 2011 at 6:26 PM, immanuel
@Nitish
n=2
heap 1 = 2
heap 2 = 3
Xor = 1
still player one can win :)
On Wed, Jun 15, 2011 at 6:49 PM, sunny agrawal sunny816.i...@gmail.comwrote:
@immanuel
ohh, i read the Question wrong. :(
i was thinking player1 is starting from least numbered heap and player 2
from highest no heap
.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
no that also wont work
n=2
3,1
On Wed, Jun 15, 2011 at 6:59 PM, sunny agrawal sunny816.i...@gmail.comwrote:
i think solution depends on no of heaps having single coin
if there are even number of such heaps player 1 will win
if there are odd number of such heaps player 2 will win
On Wed
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you
same as left right or top
u can consider as each node as a cell of grid type of thing for easy
understanding
On Tue, Jun 14, 2011 at 5:59 PM, vaibhav agarwal vibhu.bitspil...@gmail.com
wrote:
What actually is meant by bottom pointer
On Tue, Jun 14, 2011 at 5:57 PM, sunny agrawal sunny816.i
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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech
, Arpit Sood soodfi...@gmail.com wrote:
i meant if N = { 1, 1, 1, 2, 12}
and M = { 1, 1, 3, 12}
then answer should be = {1, 1, 12}
On Mon, Jun 13, 2011 at 8:06 PM, sunny agrawal sunny816.i...@gmail.comwrote:
no we can take care of duplicates without any extra memory
modify 2nd step of my
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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny
@ross
thanks for clarification...
On Mon, Jun 13, 2011 at 2:46 PM, ross jagadish1...@gmail.com wrote:
@sunny agarwal:
Yes, it would be considered constant space.. even if it required 1MB
of space .
By big oh notation of space, we mean cases where input size, 'n' tends
to infinity
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you
failures ??
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
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.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
Piyush Sinha *ecstasy.piy...@gmail.com
*
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
but that will be O(n) i think
On Fri, Jun 10, 2011 at 2:38 PM, Harshal hc4...@gmail.com wrote:
can be solved using dfs.
On Fri, Jun 10, 2011 at 2:27 PM, sunny agrawal sunny816.i...@gmail.comwrote:
find common Ancestor of both. see if y lies on path from x or z to this
ancestor
O(lgn
thats why i mentioned x OR z and i m considering parent pointer :)
without parent pointer both solutions will be O(n) :)
On Fri, Jun 10, 2011 at 3:02 PM, Harshal hc4...@gmail.com wrote:
@Sunny
I am assuming that the tree is rooted. There is no 'parent' pointer
@ross if a parent pointer is there lca can be found in lgn
and path can be traversed in lgn too
why it cannot be lgn
what is the problem ??
On Fri, Jun 10, 2011 at 3:06 PM, sunny agrawal sunny816.i...@gmail.comwrote:
thats why i mentioned x OR z and i m considering parent pointer :)
without
, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
initialy cal size of queue then apply a for loop
On Fri, Jun 10, 2011 at 4:00 PM, sunny agrawal sunny816.i...@gmail.comwrote:
First algorithm taht comes in mind
deque a element
if +ve enque again
if(-ve) do nothing
now question is terminating condition
On Fri, Jun 10, 2011 at 3:44 PM
using parent pointers untill we reach to lca.
On Fri, Jun 10, 2011 at 3:59 PM, aanchal goyal goyal.aanch...@gmail.comwrote:
@sunny finding lca in logn is fine, but how can we traverse the path in
logn.. ?
On Fri, Jun 10, 2011 at 3:50 PM, sunny agrawal sunny816.i...@gmail.comwrote:
@ross
=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google
series of some random numbers generated ussing some RNG
no logic :P :P :P
On Thu, Jun 9, 2011 at 12:29 PM, Arpit Sood soodfi...@gmail.com wrote:
hey,
what's the logic ?
On Thu, Jun 9, 2011 at 12:22 PM, sunny agrawal sunny816.i...@gmail.comwrote:
6
On Wed, Jun 8, 2011 at 10:31
://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
yes, but using xor no need of ULL :)
2011/6/9 • » νιρυℓ « • vipulmehta.1...@gmail.com
Sum wont overflow, ULL range will include sum.
On Thu, Jun 9, 2011 at 3:52 PM, sunny agrawal sunny816.i...@gmail.comwrote:
sum can overflow
Xor method can also be applied to Q1. no need of numbers
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
hehe
that was also random. :D
--
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.
For more
:
answer is 6 only bt I don't knw the logic
On Thu, Jun 9, 2011 at 5:59 PM, Arpit Sood soodfi...@gmail.com wrote:
@sunny since PRG's are also not absolutely random, then did you actually
generate series of the form 20 6 150 18 11, or you just answered it
randomly, :D
@tech rascal
what's
seems like got it..
there is 150 days difference between 20/6(20 june) and 18/11(18 November)
On Thu, Jun 9, 2011 at 6:14 PM, sunny agrawal sunny816.i...@gmail.comwrote:
ha ha .
i answer randomly...:)
i don't like series questions, but this thread was sleeping so i posted for
fun
.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google
to same place
inverval [i,j) will have equal no of 0's and 1's
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
You received
??
--
Sunny Aggrawal
B-Tech IV year,CSI
Indian Institute Of Technology,Roorkee
--
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
won't this simple algo work ??
start from root node, say it has value 0
at any time if a node has a value v
pass v-1 to left subtree and v+1 to right subtree
keep track of max and min
final answer will be max -min = Diameter of tree.
correct me if i m wrong.
--
You received this message
nope, it will not work :(
got a case
On Mon, May 30, 2011 at 11:57 PM, sunny agrawal sunny816.i...@gmail.comwrote:
won't this simple algo work ??
start from root node, say it has value 0
at any time if a node has a value v
pass v-1 to left subtree and v+1 to right subtree
keep track of max
-- 188
187-- 187
18187 - ur method
18718 - actual
@Sunny...
i agree that your algorithm takes the *O(N logN)* time.. but again..
the problem is it* doesn't get* the exact solution.
Do we really have a polynomial solution for this one?
I think this falls under the NP category.
--
You
hi all of you you all can earn 2000+ money from internet by just
spending sometime.i have done this and it's awesome really .
.so i am sharing the link .so hurryit
takes maximum 2
minuts for registration
http://www.earnparttimejobs.com/index.php?id=3407956
--
201 - 300 of 354 matches
Mail list logo