@dave...yeah got it thnx...
@sanjiv...i have explained ...
On Sat, Mar 10, 2012 at 10:09 AM, sanjiv yadav sanjiv2009...@gmail.comwrote:
actually how u r moving from 7 to 4?
can tell me in the detail...
On Sat, Mar 10, 2012 at 4:37 AM, Dave dave_and_da...@juno.com wrote:
first of all ,its not suffix array bt suffix tree..vich i mistyped...sorry
4 dat..n
yeah!!! d question demands the samebt d same question cud also b solved
by suffix trees the implementation of vich i require as there is some flaw
in ma implementation...
so ,i vud b thankful if ny has shares
1-2-3-4-5-6-7-8-9-10-11
fast and slow meet at 11
m=6;
k=4
...i cant get last two lineswhen k= sometimes around the circle -
m..
then after that taking fast at begining and slow within circle ..i cant get
this...@ dave plz explain with this example...will b of gr8 help..thnx in
NSIT
On Mar 10, 12:50 pm, saurabh arora saurabharora8...@gmail.com wrote:
which college
--
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
---
saurabh singh wants to stay in better touch using some of Google's coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-8b1926b47c-1a94807712--9DQx1eW2o_LPykR-fUVx5lOG1s
You'll
@Rahul:
As Dev said:
Now start the fast pointer at the head and take m single steps with both
pointers. The fast pointer is at the beginning of the cycle, and the slow
pointer has traversed the cycle (2*t - u) times and is back at the
beginning of the cycle.
k= (2*t-u)p -m
When fast pointer is
Isn't Abc() a constructor which means to construct the object. No need for
new..
-Cheers
Moheed
I am who I am, no matter where I am or who I am with.
*
*
On Fri, Mar 9, 2012 at 9:16 PM, atul anand atul.87fri...@gmail.com wrote:
may u r confused with java
Abc a ; // this itself is
@moheed i got it.
@Dave...Thnx a lot..i got it all now...
On Sat, Mar 10, 2012 at 5:56 PM, Moheed Moheed Ahmad mohe...@gmail.comwrote:
@Rahul:
As Dev said:
Now start the fast pointer at the head and take m single steps with both
pointers. The fast pointer is at the beginning of the cycle,
plz xplain logic and if possible plz post ths algo too...thnx in advance
--
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
Well it would take n! as you have to print all the permutations and you
will have to swap positions to find the next permutation from the current
permutation and you need to do it in a orderly fashion so that you don't
have to keep track of the permutations you have already produced to prevent
plz explain this program...
http://www.geeksforgeeks.org/archives/767
On Sat, Mar 10, 2012 at 7:09 PM, Senthil Nathan senthilma...@gmail.comwrote:
Well it would take n! as you have to print all the permutations and you
will have to swap positions to find the next permutation from the current
this might help :-
http://www.youtube.com/watch?v=NdF1QDTRkcklist=PLFE6E58F856038C69index=10feature=plpp_video
On Sat, Mar 10, 2012 at 9:11 PM, rahul sharma rahul23111...@gmail.comwrote:
plz explain this program...
http://www.geeksforgeeks.org/archives/767
On Sat, Mar 10, 2012 at 7:09
The simple form of the algorithm works like this:
Select one character of the string to be the first character in the
permutation.
Now permute the remaining characters.
Repeat selecting a different first character until you have used them all.
The code is simple:
permute(char *string, char
can we apply off-compus??
--
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 options,
Hi,
Im new to algorithms, so this might be a simple question for most of you
Lets say there are 5 trucks, each of which can take 100kg load. And they
are filled to some extent randomly.
Let the free quantity be 40kg, 30kg, 20kg, 80kg, 60kg respectively. At any
given time only single load comes.
I implemented it by using arraylist. I sorted the trucks according to the
free space and when a load comes I iterated till the point, say j where I
find a suitable space and then sorted it with the elements till j. I want
to know if I can optimize it even further if possible. I want to know if
Is it possible items are removed from the truck too?
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com
On Sat, Mar 10, 2012 at 9:39 PM, shruthi sharma
shruthi.shar...@gmail.comwrote:
I implemented it by using arraylist. I sorted the trucks according to the
yeah.. they can be removed too
On Sat, Mar 10, 2012 at 10:41 PM, saurabh singh saurab...@gmail.com wrote:
Is it possible items are removed from the truck too?
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com
On Sat, Mar 10, 2012 at 9:39 PM, shruthi
and i guess there can be multiple input loads too... i saw the same
question elsewhere too
--
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
how about going through every truck and doing temp=(free_space - load);
if(temp min temp =0)
{
min=temp;
truck = i;
}
now after traversing we have found the truck where we can add load.
no need of sorting
complexity =O(n) where n is number of trucks
space complexity = constant
On
how to find all cut vertexes in a given graph ??
--
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
http://www.geeksforgeeks.org/archives/646
Plz tell that the link i have given in this mail for tree height...isn't
the tree height is 2 in this???height is the longest path...n in path we
include the number of edges or nodes??acc. to me its number of edges in
longest path...plz tell..thnx in
should be 2.
-Cheers,
Moheed
I am who I am, no matter where I am or who I am with.
*
*
On Sun, Mar 11, 2012 at 11:04 AM, rahul sharma rahul23111...@gmail.comwrote:
http://www.geeksforgeeks.org/archives/646
Plz tell that the link i have given in this mail for tree height...isn't
the tree
Correct is always whatever the specification says. You may think something
else is more conventional, or something else may seem right to you, but
none of that matters if there are clear instructions otherwise.
--
You received this message because you are subscribed to the Google Groups
Yes, if they meet then its a loop, but in later case, they won't meet
in case where loop has anything more than 1 element.
here one ptr is at meeting point, and second is at start of loop, but
the distance between them isn't always one, its the number of elements
in the loop.
Now when u move each
but according to the o/p it should be 3i also concerned from the data
structure and algo book it is also giving same answer.so the
height/depth is the number of nodes in largest pathis it rigt???
On Sun, Mar 11, 2012 at 12:10 PM, Sonia Keys soniak...@gmail.com wrote:
Correct is
*refered from:-http://www.geeksforgeeks.org/archives/503
basically want to know that whether voting algo is corret???
*2,2,2,3,3,4,4
in this case it is giving majority element as 4 but it should be 3???plz
explain.
*
METHOD 3 (Using Moore’s Voting Algorithm)*
This is a two step process.
1. Get
can be done easily with hashing..btu takes extra space.
cant we simplify just by one step.
On Sun, Mar 11, 2012 at 12:46 PM, rahul sharma rahul23111...@gmail.comwrote:
*refered from:-http://www.geeksforgeeks.org/archives/503
basically want to know that whether voting algo is
28 matches
Mail list logo