I had to look up teachyourselfcs[1]. I haven't tried the resources, but the subject matter appears to cover standard undergrad BS in CS concepts.<p>The simplest answer is just to parity the math courses of a Berkeley / MIT / Stanford CS degree, although it will likely be a little overkill, especially if you intend to limit yourself to a strict subset of TYCS. For example, databases and networking generally require very different math prereqs than computer graphics or machine learning.<p>You will need a high school level of math (grammar school math, algebra, trigonometry, basic stats) to be able to program most things.<p><i>Discrete math</i> is used heavily in many parts of CS (it is integral to understanding how to accurately negate programming expressions).<p>You should probably understand <i>calculus</i> at a high level, although my experience with actual calculus usage in my career is zero.<p><i>Probabilities</i> are used heavily in concepts like caching / performance, which will touch OS, arch, data structures, and likely others. For this, you should find a "statistics for engineers" type of course / book for undergrads, which may or may not make use of calculus to prove some of the statistical concepts.<p><i>Linear algebra</i> is used heavily wherever graphics cards are used, so graphics, video, machine learning, etc. Linear algebra will likely have calculus as a prerequisite.<p><i>Modulo math</i> is used heavily for cryptography and some data structures (hash tables). An undergrad will get a few days or weeks of this, and probably not an entire course.<p><i>Set theory</i> and <i>graph theory</i> are used sporadically. Networking, distributed systems, etc will make use of them.<p>Hope this helps.<p>[1] <a href="https://teachyourselfcs.com/" rel="nofollow">https://teachyourselfcs.com/</a>