It's a running gag in that TV series that when Sheldon Cooper is wrong in a discussion, he will resort to some petty pedantry about grammar.
Some outdated grammarians believe that sentences should be rearranged to avoid ending in a preposition.
However, this rule is impossible to adhere to.
No wait, pardon me! "To this rule, it is possible to adhere. If speak like Master Yoda, you do!"
Legend has it that when Winston Churchill's writing was corrected by an editor to move a preposition away from the end, he mocked the editor by writing back, "This is the sort of English up with which I will not put" which is of course a ridiculous hyper-correction, because "put up with" is a "canned" compound verb which incorporates two prepositions which have to follow the verb, in that order; the prepositions cannot be moved around. A simpler example is "I will get up", which cannot be restructured into "Up I will get".
It is necessary to be aware of this "no preposition at the end of sentence", so that you can properly react if someone tries to correct you.
Just remember Churchill and Master Yoda.