Can i get into a CSU with a "D" in the second semester of Algebra 2?

I got a “D” in the second semester of Algebra 2 and a “C” in the first semester of sophomore year. This upcoming year I will be a senior. It says on the a-g requirements that if I take statistics and get a C or higher it’ll validate Algebra 2. Did I understand that right? And I’m not sure what counts as statistics because I took Finite/statistics my Junior year and got C’s and higher and next year I will be taking AP Stats. Will getting a C or higher in AP stats validate my Algebra 2 grades? Or have I already validated them with Finite/statistics?
I plan on majoring in computer science and I’m in-state. Going to either San Jose or SF state.

My current weighted gpa is 3.17
and my non-weighted is 3.00

According to the CSU website:
A letter grade of C or better in Statistics will validate Algebra I and Algebra II, but will not validate Geometry.

Is Finite/Statistics listed as an a-g course for your HS? You can check this link by typing in your HS’s name:

https://hs-articulation.ucop.edu/agcourselist#/list/search/institution

For sure, AP Stats will validate your D for Algebra 2.

For SJSU, you will need an Eligibility index of at least 4500 to be admitted for CS (toughest major at SJSU), so based on your Weighted GPA of 3.17, you would need a 2000 SAT score (not mathematically possible) to get your Eligibility index to the level needed.

EI= (CSU GPA x800) + (SAT Math + EBRW)

For SFSU, since CS is not impacted, you might have a chance if you get a solid SAT score of at least 1250+. You do realize that CS is a very Math heavy major and if you are barely passing your Math courses with a C, then you will have a difficult time with Calculus, Discrete Math, Linear Algebra etc… as a CS major.

I would also suggest instead of taking AP Stats, you take Pre-Calculus since this class will be far more beneficial to you in college if you plan to pursue a CS major. Pre-Calculus will also validate your Algebra 2 course if you pass it.