This question already has an answer here:
So here's a funny thing: I have 3 Fs and 1 D on my transcript, but my GPA is ~3.8, which is "high" because I double majored in math and computer science. The reason for those 4 bad grades is that I had 2 bad semesters where I suffered from depression; I didn't drop the classes before the deadline so I ended up failing the classes. However I retook the classes and got As in them (hence my GPA), and in fact got A/A-s in all subsequent classes (quite an improvement). I plan to apply to a master's for computer science, and eventually a phd. However I know the admission officers eyes will bleed when they see my transcript, despite my GPA, because my school keeps ALL grades on transcripts, even if the grades were replaced by retaking classes. Do I still have a chance at top-10 graduate school for computer science even with these grades (which were retaken and then aced)?