Stadler Rail interview question

Analysis of a block algorithm