How to solve Under the tunnels and Construct Array?

Check this post