This is an absolutely brilliant collection of books made from Q&A of stack overflow. The experiment has been shutdown but the outcome is a collection of books available here. I quickly looked through the algorithms and R books and they seem really good!
The books are available at http://goalkicker.com/
the stackoverflow archive to download is available at https://stackoverflow.com/documentation
and the discussion on reddit about this is at https://www.reddit.com/r/programming/comments/7rgz78/a_lot_of_free_pdfs_about_programming_from_stack/