Dead Men Walking
Medium mathematics interview practice: Dead Men Walking.
100 zombies walk on a line at equal speed, some left, some right, at 1-unit intervals. When two collide, both reverse direction. How do you calculate total collisions?
Medium mathematics interview practice: Dead Men Walking.
100 zombies walk on a line at equal speed, some left, some right, at 1-unit intervals. When two collide, both reverse direction. How do you calculate total collisions?