I did this for a few classes because my teachers had such a thick accent that I could barely understand them. I figured out that if I read the book beforehand, I basically knew what they were going to say and I could follow along much easier.
In retrospect I probably should’ve eaten $2k and dropped for a better prof. Then again $160 on leetcode has given me more algo knowledge than my $160k degree lol.