The prostitute had a contrite and truthful heart. She acknowledged what she was. It was her forthcoming and honest answers that caused Jesus to even take notice of her. She told Him things about herself, that He already knew!
Did Ted Bundy, confess and express remorse for what he had done? ( honestly, I do not know, if he ever expressed regret)
Remorse, confession and a willingness to turn away from our wrong doing is what brings about forgiveness. There is no sin, that Jesus won't or can't forgive, other that blasphemy against God.
** I disagree with JGhoul, prostitution is NOT a victimless crime. There are millions of children, and teenagers forced into this activity. Even grown, mature and seasoned women are beaten by their pimps, for not earning enough. All of this, and destroyed marriages.