These were the books recommended in the year 2017. You can have an idea for the references. I used only PDFs during the first year, and it depends on you if you want to buy the book.
Purchasing Introduction to Algorithms by Cormen is recommended, as you will require it for the next four years.
I.1 Seeing the world through calculus. First steps through symbolic mathematics
Thomas’ Calculus
I.2 Linearity in Nature: Engineering through Linear Algebra. First steps through numerical algorithms
Linear Algebra and Its Applications
I.3 Optimizing Memory use through Data Structure and Design
Let Us C
I.4 The Science and Art of Logic and Programming: Algorithms
Introduction to Algorithms