Perpendicular to the hill is the same as flat ground, so as long as traffic is clear, that's a good method.
It's also a way to avoid not having to walk up a hill that's too steep for you. Zig-zagging across the road effectively decreases the steepness (but adds distance). Again, you need to make sure there's no traffic, but if "plan B" involves walking, I'd rather zig-zag. You can also use this method partway up a tough climb to recover until you can go back to heading straight up.