yup I found a way to do it with queues! and wow that pretty interesting to see that it can be diagrammed like that. Thanks for all your help though!
Type: Posts; User: saabro
yup I found a way to do it with queues! and wow that pretty interesting to see that it can be diagrammed like that. Thanks for all your help though!
If an object randomly steps twice in one dimension, there are four possibilities of the different paths it can take. With 0 being the start position, it can move to -1 to 0, 1 to 0, -1 to -2, or 1 to...
so what if i used a 2 dimensional array instead of an arraylist, would a value of a new array steps[0][0] change because test[0] changes?
0
0.13535019992237296
-1
0.03138735803814374
-2
-1 steps.get(0)[0] initially
-2
-2 steps.get(0)[1] initially
1
0.6373879863545836
ok I made the code readable now, I just dont understand why the arraylist would keep changing its first value when I never tell to :/
Hi everybody, I have to write a program that enumerates all possible walks of any number of random 1 dimensional steps, and I think I have everything right, except my arraylist that I use to keep...