A
railway zig zag, also called a switchback, is a way of climbing hills in difficult country with a minimal need for
tunnels and heavy earthworks. For a short distance (corresponding to the middle leg of the letter "Z"), the direction of travel is reversed, before the original direction is resumed.
See more at Wikipedia.org...