It depends! From the student’s perspective, using just one contest means they will see their rankings across both sections. If the students know each other, this can be a great way to promote competition.
On the other hand, creating separate contests for each class will help you keep your records separate, since you will have separate reports for each class. How you run your class is entirely up to you!