If your ex-girlfriend was the one who decided to end things, then you first need to understand her reasons for doing so, and try and fix those problems, accordingly. If it was something to do with your attitude or personality, then it is relatively simpler to work on. However, if she left you because of infidelity, you will have to take more effort.