There is a great novel by Max Brooks called World War Z that contemplates this very issue. It is actually a very interesting topic because zombie warfare is different from any other that mankind has ever faced. Zombies are not afraid, do not rest, do not stop, and never show mercy. And, they used to be us. So when fighting them, some of our losses turn into zombies, and we are faced with the horrifying dilemma of whether or not to put them out of their misery before they turn into more enemy.
In World War Z, zombies could not swim, but they could walk the Ocean Floor. So droves of them would just show up on beaches and climb anchor lines.
So, a sailboat would be a decent place if you accommodate the anchor line.