Try to avoid ending a sentence with a preposition. This is not really a rule, but lots of people think it is. So, to ensure you don't annoy your readers, just avoid the situation. If rewording your sentence makes it sound too contrived, just go for it and end your sentence with a preposition. (Sometimes, the cure is worse than the "problem.")
Ending a Sentence with a PrepositionAs a useful guideline, try to avoid ending a sentence with a preposition. (However, as shown later in this section, there are several factors to consider.)
Not a Serious ErrorWhere possible, you should avoid ending a sentence in a preposition. However, after shuffling the words so that the preposition is not at the end, the re-structured version often sounds contrived and unnatural.
Reword to AvoidOften, the best solution is to re-word the sentence.
Leave the Preposition at the EndIf the sentence sounds too contrived after it has been reworded, another option is to leave the preposition at the end of the sentence.
If you cannot find an alternative without a preposition, you have a choice whether to leave the preposition at the end or to re-structure your sentence.
Some readers will frown at the first example below because it ends in a preposition. The second example sounds, for many people, too contrived.
Either can be used. There are no hard and fast rules on this subject. However, most grammarians would select option 1 when speaking but option 2 when writing.
IS IT EVEN A PREPOSITION?
Verbs like to cope with and to come up with are known as verbal phrases. It could be argued that these do not contain prepositions at all. It could be claimed that the words in a verbal phrase that look like prepositions are not prepositions, but just part of the verb. If that's true, then it should be okay to end a sentence with a verbal phrase, meaning this sentence would be fine:
What are prepositions?
The object of a preposition
Verbs with prepositions - succinct writing