Back to problems

Remove at Most One Blocker to Minimize Signal Completion Time

Algorithm · Google · Hard

Optimized Signal Propagation Medium · Topics · Company Tags · Hints You are given a rectangular grid consisting of H rows and W columns. Each cell is one of four types: 'S' – the source where a signal originates at time 0. 'T' – a target that must receive the signal. 'B' – an impenetrable blocker. '.' – an empty, traversable cell. Every time step, the signal spreads from every already-reached cell to its four orthogonal neighbors (up, down, left, right). Blocker cells stop…

Checking your access…