Is it OK if I get a C in algebra, or do I need to retake the class to get a B?
For the purposes of admission to the CS major, you do not need a B in algebra. In order to be admitted to the major, you must have As and Bs in all of your CS courses, and in all of your math courses at the level of calc I and higher. Lower-level math courses are not considered for admission.
Please note, however, that you are also required to have a 3.0 cumulative GPA in order to be guaranteed major admission. Don't let low grades in courses that aren't required for the major bring down your GPA and prevent you from being admitted to the Computer Science program.