@rahul: I got my fault. I didn't thought about that test case. I am
thinking about applying DFS traversal algorithm for graph here. It may work
here.
On Wed, Oct 17, 2012 at 9:01 AM, Rahul Kumar Patle
patlerahulku...@gmail.com wrote:
@navin: still i am not getting your solution.. can you make
How can i create a new instance for every thread in java? Instead of
reusing the same existing instance
--
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
the size of the substring is an important factor~~
if the substring is only a character, it is easy.
if the substring is 2 characters than the big string , it is easy too~~
am i right? :-)
2012/10/18 Ashish Goel ashg...@gmail.com
there is a big string which needs 2GB memory to fit in but you
Actually *fflush(stdin)* is the problem here, your reading of inputs is all
messed up, at least on my machine( and probably on the machine you are
submitting the code too).
Maybe it's working fine on your particular environment but generally
fflush() is only defined on output streams. (see this
if u are extending Thread class, then u can simply make a new object of the
class(that is extending thread) and you will get new instance for every
thread.
if u are implementing an interface, then when u create a thread object by
Thread t=new Thread(object); and pass a different object