subrahmanyam pvb

Greenhorn
+ Follow
since Jan 02, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by subrahmanyam pvb

hi all. this might be an old cracker.. but i have recently solved it.

there is an array with 2n+1 elements wherein 'n' elements are repeating twice. there is only one odd element. find that with a complexity in the order of 'n' ???
17 years ago
Thank you all.
i didn't know 'javaranch' gives such a speedy response. liked this place.
thanks for putting all that stuff in order. that cleared the picture for me. but, i see this function 'activeCount()' there. so, if i can make all my threads 'wait()' until i count them, then i can 'notifyAll()' and stop them and the output would just be the 'count'. i am trying to improve on this. get you back soon.
i am now feeling confident that somebody is there who can guide me.

thanks to one & all.
hi all,

i am a novice in 'java' and new to this place. pls help me in solving this thing.

problem description:

there is a worm.
from the second minute of its birth, it gives another worm for every minute.
this goes with all the worms.

user input : no.of minutes.
desired output : no. of worms present.


here, i am trying simulate the above situation with multiple threads, wherein every thread, creates another thread from the second minute. and this goes till the given end.

but, my prog is not at all working and i can't figure out the problem.

PS: pls ignore the overhead of multiple threads. hope you will encourage my attempt to get the feel of 'threads' in java.