For years, there has been a grammar myth floating around that it is wrong to end a sentence with a preposition. But if you do a quick Google search, you’ll find dozens of grammar experts who say that this myth is simply that: a myth.
The following sentences are all legitimate:
Haters would all argue that the above sentences are incorrect. To avoid ending them with prepositions, they would undoubtedly express them as the following:
Although the non-preposition-at-the-end versions are perfectly correct, they sound rigid and unnatural. The first three sentences (which end with prepositions) are much more natural.
TLDR*: Both versions are correct and acceptable.
* too long; didn’t read
Don’t fall for grammar myths. Stay cool and ask for help if something sounds odd.