take this approach
fill array of snakes starting position in snake[num_snake]
for each snake[i] , take the end of snake and fill in some other array
take random number gen and fill these arrays--
e.g. end_snake[i] = ran(start_snake[i]-10) // so that snake does not
end up in same row
same logic
@bittu, we are here to discuss the way to solve it. Posting a code here will
not do anything good.
Anil Kumar S. R.
http://sranil.googlepages.com/
The best way to succeed in this world is to act on the advice you give to
others.
On 14 September 2010 13:33, bittu shashank7andr...@gmail.com
#includestdlib.h
#includestdio.h
#includemath.h
#includeconio.h
///O(N^2) solution Does solution exits
in O(n) or (nlogn)..? reply me sum1 git dis..
//i will post analysis of dsi program later
int turn, square;
long game, totalgames;
int seed;
int chutehit[10],
Hi
On 14 September 2010 13:33, bittu shashank7andr...@gmail.com wrote:
#includestdlib.h
#includestdio.h
#includemath.h
#includeconio.h
///O(N^2) solution Does solution exits
in O(n) or (nlogn)..? reply me sum1 git dis..
//i will post analysis of dsi
And please stop posting the same thing twice. It's been happening for
the past couple of days at least.
@Question:
I think you can use graphs and flood fill algo for this. Every
possible move can be represented with an edge. Flood fill will help
you figure out possible moves from you current