Tricky one. If Stacy is the 12th tallest, that means there are 11 people shorter than her. If she's the 12th shortest, that means there are 11 people taller than her. Note that, although it's not important for this question, Stacy is the median height in her class.
If there are 11 people taller, 11 people shorter, and Stacy, that's
11 + 11 + 1 = 23 people in the class. Choice (B).