My own way of writing is very meditated and, despite my reputation, rather slow-moving. So I do spend a good deal of time contemplating endings. The final ending is usually arrived at simply by intuition.