In A Clockwork Orange, at the end, Alex tells the psychiatrist about his recurring dream of doctors performing surgery on his brain. He wasn't dreaming when he saw this. A team of doctors had successfully undid the damage caused by the Ludovico technique, they reset Alex to the way he was before. That's why he took a psychiatric evaluation, the doctors wanted to know if it worked.

Also, the book ends differently than the movie. In the book, there is a scene after Alex leaves the hospital, where he goes to a shopping mall and consciously decides to give up his life of crime and violence.

I once took a carryout order in person (instead of the usual over-the-phone). I told the customers, who were waiting at the front counter, that it would be ready in 45 minutes. What do they do? They fucking stand there, right at front counter, for the whole 45. We kept getting customers that were wanting to pick up pizzas, stand behind them, because they thought they were in line. They never stepped aside. They never told anyone behind them that they weren't in line. This was a Friday night.

This is disgusting. It's absolutely horrific how these monsters can kill a bunch of knowingly innocent people and actually feel good about themselves. They're proud of what they're doing. They think they're doing the right thing, and they're willing to kill anyone who doesn't. How do these people even live with themselves?