Hopefully the title explains my question.
I want to apply to PhD programs next fall (2021). My grades in algebra and number theory were rather poor (C+ and B- respectively). Analysis was descent (B). Overall, however, my record is not stellar by any means (2.9-3.0).
However, since graduating, I've been working thru the content of those courses in my own time, and a sense of maturity in proof-writing is solidifying. I have 2 options: retake undergrad some undergrad courses (ex. algebra, number theory, maybe even analysis) for A's or take the corresponding courses in a masters program at my local state uni (not extremely highly ranked or anything. decent school).
I will have the opportunity to do research in my masters program, in addition to opportunities to build strong connections with professors. I'm personally thinking a year of research with strong letters will hopefully put some bandage over a mediocre undergrad.
Some input from more experienced/knowledgeable folks would be much appreciated! Thank you!