In order to apply for CS in college, how many years of Physics is recommended in HS?

IB is generally considered more work. While AP courses are targeted to common frosh level US university courses, IB courses may differ somewhat in content.

For IB math, choose the A&A versions over the A&I versions for a student going into a math-heavy major in college. HL obviously covers more advanced material than SL, and is more likely to get subject credit and advanced placement in college (check colleges’ web sites for how much subject credit and advanced placement each IB and AP exam and score may give).

Here is an example of what the UCB math department gives / recommends:
https://math.berkeley.edu/courses/choosing/high-school-exam-credits

(Math 1A, 1B = single variable calculus; Math 10A, 10B = calculus, statistics, and mathematical methods for biology and medicine; Math 16A, 16B = calculus for business majors)

Exam Score Subject credit
AP calculus AB 3, 4, 5 Math 1A
AP calculus BC 3, 4 Math 1A
AP calculus BC 5 Math 1A and 1B
IB math A&A SL any none
IB math A&A HL 5, 6 Math 1A
IB math A&A HL 7 Math 1A and 1B
IB math A&I SL any none
IB math A&I HL 5 Math 16A
IB math A&I HL 6, 7 Math 10A or 16A