The last two semesters I've had classes where I've met all prerequisites. Yet upon the second week or so (when its too late to drop) I realize the entire class is based off another class which was not a prereq. I think I'm a good student but I'm struggling so much with things the other students do with ease because they've already learned the material. I can't keep doing this every semester, its very discouraging and draining. How do I avoid this or what should I do? I could take the said "hidden prereq.", but this wouldn't help me this semester or the next. In fact, it would only help me in my last semester of undergrad; assuming it'd be helpful at all at that point. Is this common in grad school?
EDIT: I am following my schools recommended academic plan to a T. We have a laid out course plan to take course A in semester 5, course B in semester 7, etc. I'm 2nd semester Junior, 6/8 overall. You can deviate but I have NOT done that (at least for the courses I'm complaining about). I have not changed majors, institutions, nothing weird. I'm honestly surprised this is not a common thing. To be specific, I'm taking Computational Astrophysics which requires an intro astro course and vector calc + differential equations. I've taken a recommended course in the past labeled as Math for scientists and engineers (also labeled as a continuation of vector calc + diff eq) yet it relied almost exclusively on linear algebra and we never once did a real world problem. I have not taken linear algebra, the only matrix related math I ever took was a brief intro in highschool. NOTE that this computational astro class is specifically for astrophysics majors (me) and the astrophysics curriculum excludes linear algebra and any classes which require it. In general, this course requires way more programming skills than I have learned from my courses, the teacher even said so, although I might manage as I have gained some experience with coding through research I've been doing. Classmates of mine who have taken the same classes are either cheating or dropping out of the class because of how ridiculous it is (they havent gained coding experience in research). I refuse to cheat though because I want to learn and it will help me in my research (also ethical reasons obviously). I state the last bit to show the severity and how I am actually one of the lucky ones (hopefully I dont eat my words and fail).
Thank you for the suggestions to narrow the question, I know its broad.