✔ 最佳答案
I came first/last in (the) class this year.
British likes to omit the word THE. So it's acceptable to say: in class or in the class.
One thing to note though. There's no such thing as ranking in schools in most of the English speaking countries. I can tell you this because I lived in Northern Ireland, London, New Zealand and the states. So it's not common to say 考第一 or 包尾 or things like that. But if you really need to... There you go.