I'm an undergrad at the University of Maryland College Park who just finished a computer science bachelors a few days ago. Unfortunately, I didn't realize how much I liked theory (algorithms, combinatorics, graph theory) and math until this past semester. As a result, I plan to work for a few years while self-studying upper-division math and getting the necessary TCS research experience (I plan to reach out to professors at the local university once I'm ready).
My question is whether or not my undergrad academic performance is salvageable from the perspective of grad school admissions. Although I ended up with a 3.895 cumulative GPA with relatively good grades in TCS-related classes (e.g. A- in discrete math, A in algorithms, A in number theory, A in cryptography, B+ in advanced data structures), I have 4 W's (withdrawn designations) on my transcript across different semesters. Moreover, these W's are all in math classes (euclidean & non-euclidean geometry, numerical analysis, combinatorics & graph theory, machine learning). However, with the exception of the geometry class, I dropped all of them since I didn't meet the official prerequisites. I had originally requested prerequisite overrides to register for the courses, but left due to not being able to catch up.
Also, due to COVID-19 I opted for the pass/fail grading system this past semester. Therefore, even though I took theory of computation and combinatorics & graph theory and scored an A, A- respectively, these classes show up as P's on my transcript. Thus, I'm wondering (a) if a master's will help my case and (b) if one is necessary. If at all possible, I'd prefer to apply directly to PhD programs after getting some research experience.
Additionally, would having a publication by the time of application change any of those answers? I know theory programs in machine learning and computer vision basically require publications these days in order to be considered, but I'm not sure if the same holds for subfields like combinatorial optimization and graph algorithms.