When the ending finally comes to me, I often have to backtrack and make the beginning point towards that ending. Other times, I know exactly what the ending will be before I begin, like with the story "A Brief Encounter With the Enemy." It was all about the ending - that's what motivated me.