Often you can find some solutions to problem sets on course pages that use the book.
I agree that it would be better to provide solutions, but not all textbooks are written to be used in self-study. I don't know enough about CS to offer up any concrete recommendations, but there are math books that come with worked problems (e.g., https://www.springer.com/series/3423) and other math books that don't have worked problems (https://www.springer.com/series/666).
There are other sources on the web with answers. For example, https://sites.math.rutgers.edu/~ajl213/CLRS/CLRS.html
Often you can find some solutions to problem sets on course pages that use the book.
I agree that it would be better to provide solutions, but not all textbooks are written to be used in self-study. I don't know enough about CS to offer up any concrete recommendations, but there are math books that come with worked problems (e.g., https://www.springer.com/series/3423) and other math books that don't have worked problems (https://www.springer.com/series/666).