Credit for this problem goes to Brilliant. Thanks!

zig-zag

Solution